![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've been trying to get away from using tables as a layout tool, but I've just come across what I consider to be a serious liability. If I specify a width (minimum, really) in a div, such as #body { width: 90%; margin-left: 5%; margin-right: 5%; border: 1px solid navy; padding: 10px; } |

#3
| |||
| |||
|
|
To clarify, I want a box with a border that usually takes up 90% of the window, but expands if the content inside is too big to fit. I could use a table, but would like to use a div/CSS if I can. |
#4
| |||
| |||
|
|
kaeli <tiny_one (AT) NOSPAM (DOT) comcast.net> wrote: To clarify, I want a box with a border that usually takes up 90% of the window, but expands if the content inside is too big to fit. I could use a table, but would like to use a div/CSS if I can. Add "display:table" to your #body rules. |
#5
| |||
| |||
|
|
In article 7fgvg0t2j8t8jbnml4bl0vn8ad2dmohtir (...utvinternet.ie>, me (AT) privacy (DOT) net enlightened us with... kaeli <tiny_one (AT) NOSPAM (DOT) comcast.net> wrote: To clarify, I want a box with a border that usually takes up 90% of the window, but expands if the content inside is too big to fit. I could use a table, but would like to use a div/CSS if I can. Add "display:table" to your #body rules. Sweet!! Excellent. Worked like a charm, at least in IE6 and NN7. I didn't test other browsers, as this is an intranet app. |
#6
| |||
| |||
|
|
kaeli <tiny_one (AT) NOSPAM (DOT) comcast.net> wrote: me (AT) privacy (DOT) net enlightened us with... kaeli <tiny_one (AT) NOSPAM (DOT) comcast.net> wrote: To clarify, I want a box with a border that usually takes up 90% of the window, but expands if the content inside is too big to fit. I could use a table, but would like to use a div/CSS if I can. Add "display:table" to your #body rules. Worked like a charm, at least in IE6 and NN7. I didn't test other browsers, as this is an intranet app. It worked in IE6?! I've never seen CSS tables work in IE6 before. |
#7
| |||
| |||
|
|
To clarify, I want a box with a border that usually takes up 90% of the window, but expands if the content inside is too big to fit. I could use a table, but would like to use a div/CSS if I can. Add "display:table" to your #body rules. Sweet!! Excellent. Worked like a charm, at least in IE6 and NN7. I didn't test other browsers, as this is an intranet app. It worked in IE6?! I've never seen CSS tables work in IE6 before. |
#8
| |||
| |||
|
|
display: table; is ignored in IE6, but IE6 was already 'working' because it incorrectly treated the width as a min-width. Hence, only those browsers that support display: table; actually 'needed' it in this case. |
![]() |
| Thread Tools | |
| Display Modes | |
| |