Reputation: 187
I am new to HTML. so, i had a doubt how to create a background color or image for field set border? can i able to use the normal color values for field set or any special color codes are needed for creating background color in field set? any information will be helpful. i already have a background image for the HTML and i want to apply a background color to the field set border.
Upvotes: 1
Views: 3664
Reputation: 5930
In your CSS code, add:
fieldset {
border: solid red;
}
This will make the borders of the <fieldset>
red
.
Most standard colors are supported. You can also use hexadecimal values, such as #FF0000
, which is also red. The first two hexadecimal numbers are the red component, the middle two are the green component, and the last two are the blue component.
To insert an image background, use:
fieldset {
background-image: url('background.png');
}
CSS code can be be stored in a file (for example, style.css
) and included in the <head>
of a HTML document, like this:
<link rel="stylesheet" type="text/css" href="style.css"></link>
Or directly in your HTML like so:
<style>
/* CSS Code here */
</style>
Upvotes: 1
Reputation: 9947
you can use this
.field_set{
border-color:#F00; //your color here
border-style: solid; //border style
}
You can also specify other css properties here as normal css styling
Upvotes: 1