Jump to content
xisto Community
Sign in to follow this  
Amezis

Bordercolorlight/dark In Css?

Recommended Posts

You should be able to specify the border colours by including a Hex colour code to each or all borders using the properties of " border-color", "border-top-color",( also bottom, right, left).The shorthand for specifying Border Properties is : width, style, color, in that order, so, #table1 { border 1px solid #xxXXxx;} would set a solid 1 pixel wide border of colour xxXXxx to the element. Styles available include solid, dotted, groove, double, inset, outset.Possible values are "#hex value for colour", Transparent, Inherit.Have fun...

Share this post


Link to post
Share on other sites

You can also write the name of a color like:

#table1 {border: 1px solid black;}

And if you dont want all borders (top, right, bottom and left) you can specify it too:

#table1 {border:1px 0 0 0} which (in the order i wrote above) will give 1pixel to the top border and cero to the others. You cant tell the style and color in this shorthand though.....

Theres also a shorter - shorthand for width in the borders, which you can asign only two values to your border and it will assign the first one to the top and bottom borders and the second one to the left and right, like this:

#table1 {border: 1px solid black;border-width:1px 5px} 

In order for this to work you must have set the other style and color attributes first...

This also works for margin, and padding...

Share this post


Link to post
Share on other sites

You should be able to specify the border colours by including a Hex colour code to each or all borders using the properties of " border-color", "border-top-color",( also bottom, right, left).

196840[/snapback]

Oh yeah I didn't think about that! I am not that bad in CSS, and I knew that.. I just didn't think about it, but thanks, I'll try it! ^_^

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.