Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-15-2011, 09:48 AM   PM User | #1
kenshn111
New Coder

 
Join Date: May 2010
Posts: 75
Thanks: 13
Thanked 2 Times in 2 Posts
kenshn111 is an unknown quantity at this point
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?
kenshn111 is offline   Reply With Quote
Old 05-15-2011, 10:54 AM   PM User | #2
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,602
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
Do you have any script in your page (like e. g. superleight) that could interfere with your image?
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 05-15-2011, 03:18 PM   PM User | #3
kenshn111
New Coder

 
Join Date: May 2010
Posts: 75
Thanks: 13
Thanked 2 Times in 2 Posts
kenshn111 is an unknown quantity at this point
I don't think that there is any..
no, I don't have any scripts that could interfere my img in IE.
kenshn111 is offline   Reply With Quote
Old 05-15-2011, 09:00 PM   PM User | #4
SKY-ProToSs
Regular Coder

 
Join Date: Apr 2006
Posts: 111
Thanks: 0
Thanked 2 Times in 2 Posts
SKY-ProToSs is an unknown quantity at this point
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.
SKY-ProToSs is offline   Reply With Quote
Old 07-13-2011, 09:58 PM   PM User | #5
tyealia
New to the CF scene

 
Join Date: Jul 2011
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
tyealia is an unknown quantity at this point
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
tyealia is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:08 AM.


Advertisement
Log in to turn off these ads.