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

zingo on 04/09/08


Tagged

fix css style stylesheet


Versions (?)


Who likes this?

7 people have marked this snippet as a favorite

blackabee
Wiederkehr
basicmagic
SmpleJohn
jonhenshaw
crashdr
digiloper


8 Premium One Line Css Tips


Published in: CSS 


URL: http://cssglobe.com/post/1392/8-premium-one-line-css-tips

  1. /* 1. Vertical centering with line-height */
  2. line-height:24px;
  3.  
  4.  
  5. /* 2. Prevent oversized content to break fixed width floated layouts */
  6. #main{
  7. overflow:hidden;
  8. }
  9.  
  10.  
  11. /* 3. Prevent line breaks in links */
  12. a{
  13. white-space:nowrap;
  14. }
  15.  
  16.  
  17. /* 4. Always show Firefox scrollbar */
  18. html{
  19. overflow:-moz-scrollbars-vertical;
  20. }
  21.  
  22.  
  23. /* 5. Centering block elements horizontally */
  24. margin:0 auto;
  25.  
  26.  
  27. /* 6. Remove vertical textarea scrollbar in IE */
  28. textarea{
  29. overflow:auto;
  30. }
  31.  
  32.  
  33. /* 7. Force page breaks when printing your document */
  34. h2{
  35. page-break-before:always;
  36. }
  37.  
  38.  
  39. /* 8. Remove active link borders */
  40. a:active, a:focus{
  41. outline:none;
  42. }

Report this snippet 

Comments

RSS Icon Subscribe to comments
Posted By: jonhenshaw on April 11, 2008

Excellent list. Thanks for posting it.

Posted By: SmpleJohn on April 11, 2008

I like it. Some helpful hints in there. Thanks.

You need to login to post a comment.