Click here to Skip to main content
15,881,173 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my question is about the difference occurs in table dimensions in IE and google chrome browsers:
my html code :

HTML
<tr>
<td colspan="21" width="950" height="284" style="background-color:Black;">
		
	<div id="features" style="overflow: hidden; width: 950px; ">
		<ul style="removed: relative; margin: 0px auto 0px 0px; removed -3px;  width: 950px; removed 0px; height: 288px;">
				<li style="removed: absolute; removed 0px; removed 0px;  display: none; z-index: 3; opacity: 0; width: 950px;">
                    <img src="images/topbanner1.jpg" alt ="" style="height: 288px; width: 950px"/></li>
				<li style="removed: absolute; removed 0px; removed 0px;  display: none; z-index: 2; opacity: 0; width: 950px;">
                    <img src="images/topbanner2.jpg" alt="" style="width: 950px; height: 288px" /></li>
				<li style="removed: absolute; removed 0px; removed 0px;  display: list-item; z-index: 1; opacity: 1; width: 950px;">
                    <img src="images/topbanner3.jpg" style="width: 950px; height: 288px;" alt=""/></li> 
                   
</ul>
</div>

</td>		
<td>
<img src="images/spacer.gif" width="1" height="288" alt=""/></td>
	</tr>


and the css:
CSS
#features {
			width: 950px; 
height: 286px; 

/*margin: 0 0 48px 0;
			overflow: scroll; /* Changed to hidden if javascript enabled*/
		}
		#features ul {
				width: 950px; 
				height: 286px; 
			}
			
			#features ul li {
				float:  right;
				width: 950px; 
				height: 286px; 
			}


the view of this td in IE browser is truly 950px
but when i view it in google chrome the width is change to 1282px!!!!

please i need your help to fix my trouble and know the reason behind this difference
Posted
Updated 6-Nov-12 20:50pm
v3
Comments
I used this code by adding table and tr tags...
It shows me 950 px in both the browsers.

Please post full page code and css code (if any) by clicking on "Improve question" link. It would be helpful to find the bug with that.
I apprehend some css is overiding the table structure.

Thanks.
Tadit
enhzflep 7-Nov-12 3:18am    
Q has been updated Tadit.
Oh yes.
Thanks Simon for notifying me.
Added one comment for the query... :)
enhzflep 7-Nov-12 3:58am    
Haha. :-)

I checked the website http://line25.com/wp-content/uploads/2010/snowboard-design-code/demo/index.html[^] and found that the div "features" has width "940px".

So no matter what content goes inside it and what width it has inside that div (like the ul tag inside this div has width "2820px"), but the width will be taken from outer div which contains all.
So, width will be 940 px.

And as per the comments by @sarah mm -
@sarah mm wrote:
you are right and i solve the problem. the width became 1282px because of another td dimension altered by function call
the problem not in this td.
Thanks @sarah mm for updating me that your problem is solved.

Thanks a lot...
 
Share this answer
 
Comments
Thanks for accepting and upvoting the answer @sarah mm.
U should use % value instead pixel.Then it will automatically work.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900