Can Division Width Conform To Content

X

X l e c t r i c

Is there a way that a division's width can simply conform to the
division content width. Similar to how a table/cell width will conform
to the width of the content in the table/cell.

Or will it always be the width of the page unless I specify a value.

Art.
 
M

Mitja Trampus

X said:
Is there a way that a division's width can simply conform to the
division content width. Similar to how a table/cell width will conform
to the width of the content in the table/cell.

AFAIK only by setting display:table-cell, which IE ignores.
 
N

Neredbojias

With neither quill nor qualm, X l e c t r i c quothed:
Is there a way that a division's width can simply conform to the
division content width. Similar to how a table/cell width will conform
to the width of the content in the table/cell.

Setting the div to 'position:absolute;' does that.
 
K

kchayka

Neredbojias said:
With neither quill nor qualm, X l e c t r i c quothed:


Setting the div to 'position:absolute;' does that.

Be warned, however, that not setting width on absolutely positioned
elements can have very different results in different browsers.
Use with extreme caution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top