You are here: Re: Width of tables next to float « HTML « IT news, forums, messages
Re: Width of tables next to float

Posted by Martin Jay on 08/28/07 04:57

On Tue, 28 Aug 2007 13:44:39 +1000, dorayme
<doraymeRidThis@optusnet.com.au> wrote:
>Last time I looked, my code exposed an odd way that IE 6
>calculated width. In the model I posted, If you add
>
>table {width: 100%}
>
>the content clearly cannot fit and drops down in IE 6.
>
>What I want in IE is what you see in almost every modern
>compliant browser when you add "width: 100%" to the table. In
>particular I was hoping for a solution that kept the float. But I
>appreciate your making the suggestion of absolute positioning and
>might go your way if there is no simpler way to solve with a
>float.

Something more like this?

<http://www.spam-free.org.uk/pages/centre_table2.html>

Added 'width: 100%' to table:

table {margin-bottom: 2em; border: 2px solid #000; border-collapse:
collapse; width: 100%}

Changed '#content' so that it's floated left:

#content { float: left;}

Given '#nav' a width of 7em:

#nav {float: left; font-size: 90%; width: 7em;}

These changes work fine in IE6 and IE7, but break in other browsers.

I don't do browser hacking, so I'll leave it up to you or someone else
to work out how to apply these changes so that only IE6 and IE7 see
them. :)
--
Martin Jay

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация