CSS Outline

A CSS Outline is extremely similar to CSS Border. A CSS Outline is simply a CSS Border outside the element. Using CSS outlines you can make an element stand out and have two seperate borders.

.my_div { outline:1px solid #000; }
Would produce:

A 1px solid outline

Now let’s include this with a border.
.my_div {
  outline:1px solid #000;
  border:1px dashed #000;
}

Would produce:

A 1px solid outline, with 1px dashed border

The CSS Outline syntax is pretty much the same as CSS Borders.

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • email
  • FriendFeed
  • LinkedIn
  • Live
  • MSN Reporter
  • MySpace
  • PDF
  • Ping.fm
  • Posterous
  • Reddit
  • RSS
  • Slashdot
  • StumbleUpon
  • Suggest to Techmeme via Twitter
  • Technorati
  • Tumblr
  • Twitter
  • Yahoo! Bookmarks
  • Yahoo! Buzz
This entry was posted on Saturday, January 16th, 2010 at 9:57 pm and is filed under CSS Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Post a Comment