8 Premium One Line Css Tips


/ Published in: CSS
Save to your folder(s)



Copy this code and paste it in your HTML
  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. }

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.