Forum Moderators: open

Message Too Old, No Replies

Safari problem

table issues

         

eaglesfreak

5:32 am on Jun 24, 2007 (gmt 0)

10+ Year Member



I am developing a site and I have found that it displays how I want it to in every browser except safari.

I have one big table with 1 row and 3 cells, the left and right cells are set to 15% width and just set a nice margin for the main content which is contained inside the middle cell inside another table. the width of the center cell is 70%.

the first problem i am having is that safari doesn't seem to have the table widths displayed correctly because the main content in the center cell is pushed to the left in safari.

the second problem i am havin is that the nested table inside the center cell contains an image with the width of 760, I a have the nested table set to a width of 100% of the 70% i have alloted for the middle cell, this makes a nice fluid background for the image for people with larger resolutions. This is working just fine in FF, and IE but just doesn't seem to work in safari.

below is the code i am using and described above.

<table width="100%" bgcolor="#000000">
<tr>
<td width="15%">nbsp;</td>

<td width="70%" bgcolor="#999999">

<table width="100%">

<tr align="center">
<td background="a/pattern_092.jpg">
<img src="a/3dgallery.jpg" />
</td>
</tr>

</table>

</td>

<td width="15%" align="right">&nbsp; </td>
</tr>
</table>

this seems to work just fine in all other browsers, and seems logical and correct to me. What am i doing wrong? Why doesn't safari like me?

tedster

6:01 pm on Jun 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If you want a table-based layout to center in the browser window, how about trying this:

<table style="width:70%;margin:0 auto:">

It eliminates the need for one layer of nested tables and directly declares two equal margins for your layout, which is what you really wanted.

eaglesfreak

6:11 pm on Jun 24, 2007 (gmt 0)

10+ Year Member



thanks for the tip tedster, although that is a more efficient way of coding my example above it doesn't seem to help with the two problems i am having in the safari browser mentioned above.

any ideas? thanks.

tedster

8:37 pm on Jun 24, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you check your code by validating it?

W3C Validator - HTML [validator.w3.org]
W3C Validator - CSS [jigsaw.w3.org]

Each browser's error recovery routines are different, and trying to fix cross-browser problems when there's also an error in the mark-up an be impossible job.

eaglesfreak

9:21 pm on Jun 24, 2007 (gmt 0)

10+ Year Member



thanks, thats probaly it