Home Web Front-end HTML Tutorial Fieldset border style setting in html

Fieldset border style setting in html

May 11, 2018 pm 03:53 PM
fieldset html ie style set up frame

Maybe you think that you can use pictures to achieve such an effect, but pictures are not only slightly larger in size, but also lacking in semantics. How to achieve this effect using xhtml+css? First, we set a box (also translated as a field) through fieldset, then set a title through a specific tag legend field title, and define corresponding styles for them to achieve this effect. Let's first learn about the fieldset box and legend field title.
HTML element fieldset box
Draws a box around the text and other elements that the field set contains.
Draws a box around the text and other elements that the field set contains.
The fieldset element is used to group elements in the form and distinguish text in the document. It behaves somewhat similarly to a window frame. fieldset is available in HTML and scripts in Internet Explorer 4.0 and above.
The fieldset element is a block element. And the tag needs to be closed, that is, it must appear in pairs:

.
form#staff_info fieldset {  
    background: rgba(255,255,255,.3);  
    border-color: rgba(255,255,255,.6);  
    border-style: solid;  
    border-width: 2px;  
    -moz-border-radius: 5px;  
    -webkit-border-radius: 5px;  
    -khtml-border-radius: 5px;  
    border-radius: 5px;  
    line-height: 30px;  
    list-style: none;  
    padding: 5px 10px;  
    margin-bottom: 2px;  
}  
  
  
form#staff_info fieldset legend {  
    color:#302A2A;  
    font: bold 16px/2 Verdana, Geneva, sans-serif;  
    font-weight: bold;  
    text-align: left;  
    text-shadow: 2px 2px 2px rgb(88, 126, 156);  
}

Fieldset border style setting in html

<fieldset   style="max-width:90%">
<legend>系统使用说明</legend>
</fieldset>

Among them, border-width: 1px; is the thickness of the side, and border-color: #008000; is the border color. It is best to give him a border-width: 1px ;Otherwise this value will not show the desired thickness.

The style tag is: border-bottom-color, which sets the color of the bottom border. The other three borders separate the middle bottom. Change it to Top (upper part), Left (left part), Right (right part).

The above is the detailed content of Fieldset border style setting in html. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undress AI Tool

Undress AI Tool

Undress images for free

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

PHP Tutorial
1582
276
Why is my HTML image not showing up? Why is my HTML image not showing up? Aug 16, 2025 am 10:08 AM

First, check whether the src attribute path is correct, and ensure that the relative or absolute path matches the HTML file location; 2. Verify whether the file name and extension are spelled correctly and case-sensitive; 3. Confirm that the image file actually exists in the specified directory; 4. Use appropriate alt attributes and ensure that the image format is .jpg, .png, .gif or .webp widely supported by the browser; 5. Troubleshoot browser cache issues, try to force refresh or directly access the image URL; 6. Check server permission settings to ensure that the file can be read and not blocked; 7. Verify that the img tag syntax is correct, including the correct quotes and attribute order, and finally troubleshoot 404 errors or syntax problems through the browser developer tool to ensure that the image is displayed normally.

How to use del and ins tags in HTML How to use del and ins tags in HTML Aug 12, 2025 am 11:38 AM

Thetagisusedtomarkdeletedtext,optionallywithdatetimeandciteattributestospecifywhenandwhythedeletionoccurred.2.Thetagindicatesinsertedcontent,alsosupportingdatetimeandciteforcontextabouttheaddition.3.Thesetagscanbecombinedtoshowdocumentrevisionsclearl

How can you make an HTML element editable by the user? How can you make an HTML element editable by the user? Aug 11, 2025 pm 05:23 PM

Yes, you can make HTML elements editable by using the contenteditable attribute. The specific method is to add contenteditable="true" to the target element. For example, you can edit this text, and the user can directly click and modify the content. This attribute is suitable for block-level and in-line elements such as div, p, span, h1 to h6. The default value is "true" to be editable, "false" to be non-editable, and "inherit" to inherit the parent element settings. In order to improve accessibility, it is recommended to add tabindex="0&quo

How to use the async attribute for script loading in HTML How to use the async attribute for script loading in HTML Aug 17, 2025 pm 12:52 PM

TheasyncattributeinHTMLisusedtoloadandexecuteexternalJavaScriptfilesasynchronously,allowingthebrowsertodownloadthescriptinparallelwithHTMLparsingandexecuteitimmediatelyuponcompletion,whichimprovespageloadperformancebypreventingrender-blocking;itisbes

How to set a default value for an HTML select element How to set a default value for an HTML select element Aug 17, 2025 pm 01:00 PM

To set the default value for HTMLselect elements, the corresponding option element must be marked with the selected attribute; 1. Add the selected attribute to the option you want to select by default, such as UnitedStates; 2. Ensure that only one option in a single select has selected attribute, and if there are multiple ones, the first one will be the source code order; 3. The selected attribute can be placed anywhere in the list, not limited to the first option; 4. This method is suitable for single-select and multiple-select select; 5. If you need to set it dynamically, you can use JavaScript to operate the value attribute, such as document.querySelec

How to use the bdo tag to override text direction in HTML How to use the bdo tag to override text direction in HTML Aug 16, 2025 am 09:32 AM

Thebdotagisusedtooverridethebrowser’sdefaulttextdirectionrenderingwhendealingwithmixedleft-to-rightandright-to-lefttext,ensuringcorrectvisualdisplaybyforcingaspecificdirectionusingthedirattributewithvalues"ltr"or"rtl",asdemonstrat

How to use the address tag in HTML How to use the address tag in HTML Aug 15, 2025 am 06:24 AM

Thetagisusedtodefinecontactinformationfortheauthororownerofadocumentorsection;1.Useitforemail,physicaladdress,phonenumber,orwebsiteURLwithinanarticleorbody;2.Placeitinsideforauthorcontactorinfordocument-widecontact;3.StyleitwithCSSasneeded,notingdefa

What is the HTML Small element for What is the HTML Small element for Aug 16, 2025 am 08:04 AM

Theelementisusedforsidecomments,fineprint,orlessimportantcontentwithsemanticmeaning,notjustvisualstyling;2.Itisappropriateforcopyrightnotices,legaldisclaimers,attributions,andlimitations;3.Itshouldnotbeusedsolelytoreducetextsize—CSSshouldhandlepresen

See all articles