![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Ok, here´s a really elementary question: -- Why doesn't "width" and/or "max-width" in CSS have any effect on, for instance <div> or <td>? (I'm using Firefox.) |
#3
| |||
| |||
|
|
"palun" <flume2001 (AT) gmail (DOT) com> wrote in message news:64Ghj.2626$R_4.2127 (AT) newsb (DOT) telia.net... Ok, here´s a really elementary question: -- Why doesn't "width" and/or "max-width" in CSS have any effect on, for instance <div> or <td>? (I'm using Firefox.) They do. URL to what you have tried? |
#4
| |||
| |||
|
|
Sorry, it's not deployed. But the code is really simple: In html: div id="anId" Some stuff... /div and in css: #anId { width=400px; ^ } But the content ("Some stuff") still gets spread out over the whole page... |
#5
| |||
| |||
|
|
.oO(palun) Sorry, it's not deployed. But the code is really simple: In html: div id="anId" Some stuff... /div and in css: #anId { width=400px; ^ } But the content ("Some stuff") still gets spread out over the whole page... It's always a good idea to validate the HTML and CSS before asking for help: #anId { width: 400px; } Micha |
#6
| |||
| |||
|
|
Terribly sorry. My mistake. (I wrote the code in the message. Should have copied.) Anyway, the code is correct in the CSS-file (and it still doesn't work). |
#7
| |||
| |||
|
|
Terribly sorry. My mistake. (I wrote the code in the message. Should have copied.) Anyway, the code is correct in the CSS-file (and it still doesn't work). [...] But the content ("Some stuff") still gets spread out over the whole page... It's always a good idea to validate the HTML and CSS before asking for help: #anId { width: 400px; } |
#8
| |||
| |||
|
|
Well bust mah britches and call me cheeky, on Fri, 11 Jan 2008 10:22:23 GMT palun scribed: Terribly sorry. My mistake. (I wrote the code in the message. Should have copied.) Anyway, the code is correct in the CSS-file (and it still doesn't work). No, it isn't correct or it would work. Trust me. |
#9
| |||
| |||
|
|
On 2008-01-11, palun <flume2001 (AT) gmail (DOT) com> wrote: Terribly sorry. My mistake. (I wrote the code in the message. Should have copied.) Anyway, the code is correct in the CSS-file (and it still doesn't work). [...] But the content ("Some stuff") still gets spread out over the whole page... It's always a good idea to validate the HTML and CSS before asking for help: #anId { width: 400px; } I assure you width does work. There must be something else going on: perhaps another more specific style sets width back to auto, perhaps you mis-typed the selector, perhaps the contents overflow. This is why you have to post a url. |
#10
| |||
| |||
|
|
You are right. |
![]() |
| Thread Tools | |
| Display Modes | |
| |