Results 1 to 5 of 5

Thread: Position problems in IE

  1. #1
    Join Date
    Jan 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Position problems in IE

    website is: http://www.shaunybaby.co.uk

    The part that's the problem is the 'ads' on the right. In mozilla they're perfectly positioned. However, in IE they're pushed underneth and I've tried nearly everything to try and reposition them.

    Would be amazingly greatful if someone could lend some insight on this. Here's the code for the ads on the right:

    Code:
    .rightads {
    	float: left;
    	position:relative;
    	text-align:center;
    	width: 150px;
    	margin-left:0px;
    	margin-bottom: 10px;
    	margin-top:-87px;
    	padding:0;
    }
    .rightads_container{
    padding-left:0px;
    padding-top:10px;
    }
    .rightads_ad {
    	margin:0 0 10px 0px;
    	padding:0;
    }

    Many thanks!


    Shaun

  2. #2
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    I can't really see any ads on your page but I can give you some tips that might be helpful. If a value is 0 (zero) just write 0 without the unit:
    Code:
    .rightads {
    float: left;
    position: relative;
    text-align: center;
    width: 150px;
    margin-left: 0;
    margin-bottom: 10px;
    margin-top: -87px;
    padding: 0;
    }
    .rightads_container {
    padding-left: 0;
    padding-top: 10px;
    }
    .rightads_ad {
    margin: 0 0 10px 0;
    padding: 0;
    }
    Also, it's good practice not use padding on an element that has a specified width since IE sometimes has problems with that. Instead you could wrap the content inside that element in another container and give that container a margin.

    Good luck!

  3. #3
    Join Date
    Nov 2007
    Location
    USA
    Posts
    170
    Thanks
    8
    Thanked 22 Times in 22 Posts

    Default

    Quote Originally Posted by Snookerman View Post
    If a value is 0 (zero) just write 0 without the unit:
    Is this really necessary? Does it actually create problems if you add 'px' on the end of the 0?

    Because I do the same thing and was just wondering if it actually makes a difference....thanks!
    What is obvious to you might not be to another.


    My Site

  4. #4
    Join Date
    Oct 2008
    Location
    Sweden
    Posts
    2,023
    Thanks
    17
    Thanked 319 Times in 318 Posts
    Blog Entries
    3

    Default

    Quote Originally Posted by Moshambi View Post
    Is this really necessary? Does it actually create problems if you add 'px' on the end of the 0?

    Because I do the same thing and was just wondering if it actually makes a difference....thanks!
    Actually I'm not really sure about this one. I know for a fact that the unit is not necessary for zero values since 0px = 0em = 0% = etc.. and I've also noticed that many programs remove the units from zero values (e.g. Firebug, W3 CSS validator, several editors) so I just assumed that was considered good practice. Plus, it will save some bytes.

    This optimization site seems to be very serious about it although no explanation is given just yet:
    http://www.negabytes.com/efficiency/3.3.6.php
    Last edited by Snookerman; 01-22-2009 at 07:02 PM. Reason: added link to optimization site

  5. #5
    Join Date
    Nov 2007
    Location
    USA
    Posts
    170
    Thanks
    8
    Thanked 22 Times in 22 Posts

    Default

    Quote Originally Posted by Snookerman View Post
    I just assumed that was considered good practice.
    See that's what I figured too, that's why I have always done the same as you have and put the unit on the number EVEN if it is 0. I will have to check back on that site because I'm interested to see the reasoning behind it...all I can think is the effect on file size? but it doesn't seem like it would make that much of a difference because it would add such a minute value to the size....
    What is obvious to you might not be to another.


    My Site

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •