Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New Coder
    Join Date
    May 2010
    Posts
    79
    Thanks
    15
    Thanked 2 Times in 2 Posts

    IE <img> stretches even if width:auto;



    First: Chrome;
    Second: IE 8.0.7600.16385 64-bit Edition;
    Third: Firefox 4.

    They are images btw.
    Here's my CSS
    Code:
    	#test1 {
    	padding-left:12px;
    	margin-right:20px;	
    	position:relative;
    	float:left;
    	z-index:50;
    	width:auto;
    	height:100%;
    	}
    
    	#test3 {
    	padding-left:12px;
    	margin-right:20px;	
    	position:relative;
    	float:left;
    	z-index:50;
    	width:auto;
    	height:auto;
    	}
    Here's my code:
    Code:
    <div id="wushu">
    										<div id="test1">
    												asldka
    										</div>
    										<div id="test3" style="display:none;">
    												<img src="./style/select1.png" alt="" style="">
    												<div class="show">aslsssssssdk</div>
    										</div>
    									</div>
    Can somebody help me with this?

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,642
    Thanks
    6
    Thanked 1,005 Times in 978 Posts
    Do you have any script in your page (like e. g. superleight) that could interfere with your image?

  • #3
    New Coder
    Join Date
    May 2010
    Posts
    79
    Thanks
    15
    Thanked 2 Times in 2 Posts
    I don't think that there is any..
    no, I don't have any scripts that could interfere my img in IE.

  • #4
    Regular Coder
    Join Date
    Apr 2006
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by kenshn111 View Post
    I don't think that there is any..
    no, I don't have any scripts that could interfere my img in IE.
    don't use width: auto; and why z-index

    All you need to do is put the image inside the div, from what I'm seeing.

    No width or height or anything else are required for this.

    The div will stretch on it's own if you have html elements inside of it.

  • #5
    New to the CF scene
    Join Date
    Jul 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have been having the exact same problem with my webpage extending horizontally in IE, my ie is the newest ie9. No solution as of yet, seems like it just expands every page a few points. I have heights and width set to each div to match the background image I am using for them


  •  

    Posting Permissions

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