Web Hosting UK - Leader in Web Hosting and Domain Names





Reply
 CSS Borders
templates4all
14 February 2009 15:13
Message #1


Active participant
  • 51

Reputation: - 0 +
Group: Administrator
Posts: 114
ICQ:--
Borders can be applied to most HTML elements within the body.

To make a border around an element, all you need is border-style. The values can be solid, dotted, dashed, double, groove, ridge, inset and outset.

border-width sets the width of the border, which is usually in pixels. There are also properties for border-top-width, border-right-width, border-bottom-width and border-left-width.

Finally, border-color sets the colour.

Add the following code to the CSS file:


h2 {
border-style: dashed;
border-width: 3px;
border-left-width: 10px;
border-right-width: 10px;
border-color: red;
}

This will make a red dashed border around all HTML secondary headers (the h2 element) that is 3 pixels wide on the top and bottom and 10 pixels wide on the left and right (these having over-ridden the 3 pixel wide width of the entire border).
Back to top
aatravel
15 February 2009 16:55
Message #2


Newbie
  • 17

Reputation: - 0 +
Group: Guest
Posts: 0
ICQ:--
Thank you Admin ;)
Back to top


| More
 

Quick response Replay
1Pers. read this topic (guests: 1)
Users: 0

  Now: 22 May 2012 06:47

RSS Feed Twitter Facebook Digg Stumbleupon Favorites! More!



You Too, Join Our : Template4all