Reply to Re: Why is the table less wide than the div when they both have the same width?

Your name:

Reply:


Posted by Rik on 06/24/06 14:17

Jonathan N. Little wrote:
>> My workaround:
>> - display both as block
>
> That make no sense, both DIV and TABLE are block by default, unless
> styled otherwise somewhere else (The arguamt for posting a YRL and not
> pasted code)

In Opera, my tables won't automatically fils 100% of available width without
display:block;, that's why I added it to the table, div is automaticcaly a
100% width block in all my browsers indeed. Posted code is the entire code i
used for checking.

>> - don't give the elements that width, arrange it in <body> (or
>> another containing element), or give left- and rightmargin.
>
> I'd say the most likely culprit is the margin setting is different for
> TABLE and DIV by default for browser in question. Explicitly setting
> the margin and padding can usually fix it.
> <snip>

Nope, tested it, with margin set to zero for html, body, div & table there
is still a difference in width. 'Assume', 'usually', maybe some testing is
in order before posting nonsense.

I've only tested in FF (1.0.7, I'll have to update in the near future) &
Opera (8.52) though, maybe MSIE renders it differently.

Grtz,
--
Rik Wasmus

[Back to original 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

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