We Recommend

CSS: The Definitive Guide CSS: The Definitive Guide
Provides you with a comprehensive guide to CSS implementation, along with a thorough review of all aspects of CSS 2.1. Updated to cover Internet Explorer 7, Microsoft's vastly improved browser, this new edition includes content on positioning, text wrapping (nowrap), lists and generated content, table layout, user interface, paged media, and more.


Posted By

1man on 08/07/06


Tagged

css debug borders


Versions (?)


Who likes this?

61 people have marked this snippet as a favorite

tylerhall
jonhenshaw
samuraicoder
panatlantica
marc0047
dojob
seiglermj
theMacpenguin
chrisaiv
koncept
purpleraison
jotom
zingo
mjlassila
manub
rich13
marcoba
robotoverlord
vali29
atnexxt
sbbath
torkil
jfherring
visuallyspun
stphnclysmth
wbowers
revmitcz
cidibee
adamsimms
stylz
SpinZ
kcmr
section31
chianess
lepetitcrack
Leech
rtcrm
asturi
nighthawk
wizard04
inkdeep
sarfraznawaz2005
owais
chavcho
webology
Kraeved
keith
dougunderscorenelson
antpaw
lfx
rifat
spittingangels
chrisjlee
nightowl
nb109
codenchips
vagrantradio
medaqueno
hERB
Hollow
zartgesotten


Handy CSS Debug Snippet


Published in: CSS 


URL: http://homepage.mac.com/chrispage/iblog/C42511381/E20060806095030/index.html

Great little debuging snippet found while browsing. The code adds different coloured borders to the assets depending on its level. Leave commented out if not needed.

  1. * { outline: 2px dotted red }
  2. * * { outline: 2px dotted green }
  3. * * * { outline: 2px dotted orange }
  4. * * * * { outline: 2px dotted blue }
  5. * * * * * { outline: 1px solid red }
  6. * * * * * * { outline: 1px solid green }
  7. * * * * * * * { outline: 1px solid orange }
  8. * * * * * * * * { outline: 1px solid blue }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: tylerhall on August 7, 2006

That's so clever - never would have thought of that. I love it.

Posted By: Kraeved on April 22, 2009

1man, thank you.

Posted By: dougunderscorenelson on April 28, 2009

Very nice! I threw some "important"s onto mine to make sure they show up.

Posted By: joaojoaquim on May 6, 2009

5* thnks

Posted By: ramnath on June 26, 2009

this is very useful... thanks for the tip!

You need to login to post a comment.