Posted By

Uzbekjon on 07/07/08


Tagged

css hack ie


Versions (?)


Advertising

Website Promotion DIRECTORY is a crucial factor for all websites that need to gain better organic search engine rankings and increase website traffic.
Submitting your website as part of your Web Promotion strategy to our SEO friendly and high traffic Business Directory for review is an excellent way to gain a valuable backlink and increase your websites visibility online.

Submit Site


Who likes this?

5 people have marked this snippet as a favorite

heinz1959
SpinZ
basicmagic
dazza
asturi


Bug Fix: IE Double Margin Float Bug


Published in: CSS 






It’s an Internet Explorer-exclusive bug wherein an element that is floated – and given a margin in the same direction as the float – ends up with twice the specified margin size. The fix is extremely simple. All you have to do is apply a display: inline rule to your floated element.

Expand | Embed | Plain Text
  1. /*
  2.   Instead of this
  3. */
  4. #content {
  5. float: left;
  6. width: 500px;
  7. padding: 10px 15px;
  8. margin-left: 20px;
  9. }
  10.  
  11. /*
  12.   Do this
  13. */
  14. #content {
  15. float: left;
  16. width: 500px;
  17. padding: 10px 15px;
  18. margin-left: 20px;
  19. display:inline;
  20. }

Report this snippet 

You need to login to post a comment.

Download royalty free graphics