![]() |
![]() |
||||||
|
|||||||
| Tags: 2008, centering, ltdivgt |
![]() |
|
|||
|
.oO(mjs)
>>> Why does no width have to mean 100% width? >> >> That's how all block tags work (<p>, <h#>, <div>, etc.). > >Didn't say it wasn't. Merely asked why it was so. The logic behind it, if >you will. > >Honestly, what is there to be gained by forcing 100% width on anything >without width specified, when human logic would call for it to adopt the >width of the content? Like tables do. It's the intended nature of HTML. On graphical displays it always spreads across the entire available width until specified otherwise. This is what block-level elements do by default. Your intended shrink- to-fit behaviour can be accomplished with inline-blocks or floats. >>> I can't think of any good reason why divs can't hug content the way >>> tables do, UNLESS they're specified to be 100% wide. >> >> You are tilting at windmills as a way of avoiding the truth of HTML. > >I'm not avoiding anything; I'm asking questions you have no answers for. >There's a difference. The answer is: A div is not a table. HTML tables are quite special beasts and behave very differently, compared to the other elements. They are somewhat unique, while all other block-level elements share a common and reliable default behaviour. Micha |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise