Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Preview in IE not the same as *viewing* with IE?

Status
Not open for further replies.

THE4MAN

Technical User
Joined
Mar 17, 2002
Messages
73
Location
US
Here's an odd scenario...

I was beginning to pull my hair out trying to get a table to expand to 100% of the width of my page because each time I would check it using the "preview in IE" option, there would be a small, unwanted margin on the right hand side of my table. But here's what I don't get... I saved and uploaded this page to my server and checked it from the Net using the same exact Internet Explorer browser but now that unwanted margin is gone and my table covers 100% of the width like I wanted!

What would cause a discrepancy in how this page is displayed bewteen using Dreamweaver's option to preview in IE and just launching IE on it's own and viewing from the Web?

Thanks for any suggestions!

Dave Fore
 
How small? Is it possibly a spacer.gif that is on your local drive but not on the web directory? That is the only thing that I can think of that might possibly cause the problem. Or, do you have an empty table cell there?

Anyway, if it works the way you want, then I wouldn't argue with success. When in doubt, deny all terms and defnitions.
 
It's definately not a spacer GIF or additional cell, etc. It looks to be about 10 pixels or so wide. Not that it's a major issue, just a pain to have to upload to get a quick look. I'm baffled!
 
And now the plot thickens...

When I check the page from work on IE 5.5 (same as at home), the margin is once again displayed. This is frustrating. Maybe someone could have a look and see what I might be doing wrong?


I don't want the black space on the right side of the table, just continous white to the border. I set the table to be 100% wide. All margins to zero. What else can I do?

Dave Fore
 
<table width=&quot;100%&quot; border=&quot;0&quot; bordercolor=&quot;#FFFFFF&quot; cellpadding=&quot;0&quot; cellspacing=&quot;2&quot; align=&quot;center&quot;>
<tr>
<td bordercolor=&quot;#999999&quot; bgcolor=&quot;#000000&quot; width=&quot;31%&quot;>
<div align=&quot;left&quot;></div>
</td>
<td bordercolor=&quot;#999999&quot; bgcolor=&quot;#000000&quot; width=&quot;64%&quot;>
<div align=&quot;center&quot;><img src=&quot;logo13_jpg.jpg&quot; width=&quot;503&quot; height=&quot;245&quot; border=&quot;0&quot; align=&quot;middle&quot;></div>
</td>
<td bordercolor=&quot;#999999&quot; bgcolor=&quot;#000000&quot; width=&quot;5%&quot;>
<div align=&quot;right&quot;></div>
</td>
</tr>
</table>


paste this where the table code is... you have the background of the table cells set to white When in doubt, deny all terms and defnitions.
 
your cell bg color is set to black on the cell that holds the image. also you have specified a grey border color to cells. set all that to white Ranjan
I earn because I learn
 
I actually want the white. I want it to fill the width of the entire screen with the JPEG where it is , on-top and off-center. The height is fine, just that pesky black margin at the right of the table. Maybe I'm going about it the wrong way to acheive the desired effect?
 
table width=&quot;100%&quot; border=&quot;0&quot; bordercolor=&quot;#FFFFFF&quot; cellpadding=&quot;0&quot; cellspacing=&quot;2&quot; align=&quot;center&quot;>
<tr>
<td bordercolor=&quot;#ffffff&quot; bgcolor=&quot;#ffffff&quot; width=&quot;31%&quot;>
<div align=&quot;left&quot;></div>
</td>
<td bordercolor=&quot;#ffffff&quot; bgcolor=&quot;#ffffff&quot; width=&quot;64%&quot;>
<div align=&quot;center&quot;><img src=&quot;logo13_jpg.jpg&quot; width=&quot;503&quot; height=&quot;245&quot; border=&quot;0&quot; align=&quot;middle&quot;></div>
</td>
<td bordercolor=&quot;#ffffff&quot; bgcolor=&quot;#ffffff&quot; width=&quot;5%&quot;>
<div align=&quot;right&quot;></div>
</td>
</tr>
</table>


sorry, I misunderstood, thought you wanted all black,....try this.. it may be the black behind your jpg
When in doubt, deny all terms and defnitions.
 
The plot thickens even more...

None of the suggestions have worked, but get this... if you view the page in IE and hit the *refresh* button, the table widens to 100%. Go to another page, then click the back button, and the pesky margin reappears. Hit *refresh* again and it's gone.

I seem to be having horrible luck just getting a simple darn table to display at 100% width in IE. I tried a blank page, made it black and inserted a single row, single column table and did nothing more than color the table's background white and that stupid margin appears when previewing it. If I increase the width to more than 100%, I get the scroll bar at the bottom which too, is undesirable.

Can anyone suggest what might be happening here? What could I possibly be doing wrong? And why does hitting *refresh* in IE suddenly expand the table to 100%?

Thanks for all the helpful suggestions so far!

Dave Fore
 
I just tried it with the cellspacing=&quot;0&quot; The color runs
to the scroll bar with no black
 
You guys have been really helpful. Thanks.

I have found what appears to be a bug in IE that was causing most of the headaches in trying to resolve this problem. If I don't close my IE browser window after each preview in DW, it won't display the table width properly on the next preview. I can hit the refresh button in IE to fix it as well, but I must do one or the other, or I won't be seeing an accurate representation of what I am doing in DW.
Why this is, I don't know, but at least I have identified it and know how to work around it.

Thanks again for all of the help.

Dave Fore
 
It is because you are viewing the page as it is in your browser's cache (on your hard drive) rather than looking to the site for a fresh download. Cache is useful for users as it speeds up subsequent page loads. You as a developer need to disable this feature so you force a fresh download each view.

Peace
BT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top