Why doesn´t width and max-width work?

Why doesn´t width and max-width work?

am 11.01.2008 09:49:06 von palun

Ok, here´s a really elementary question:

-- Why doesn't "width" and/or "max-width" in CSS have any effect on, for
instance

or ? (I'm using Firefox.)

/u

Re: Why doesn´t width and max-width work?

am 11.01.2008 09:57:31 von rf

"palun" wrote in message
news:64Ghj.2626$R_4.2127@newsb.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

or ? (I'm using Firefox.)

They do. URL to what you have tried?

--
Richard.

Re: Why doesn´t width and max-width work?

am 11.01.2008 10:11:35 von palun

Sorry, it's not deployed. But the code is really simple:

In html:


Some stuff...


and in css:

#anId {
width=400px;
}

But the content ("Some stuff") still gets spread out over the whole page...


I just realized: Could any of the stuff inside the div affect its width?
I.e. can the content affect the width of the of container? (Not very
logical...)

/ulf

rf skrev:
> "palun" wrote in message
> news:64Ghj.2626$R_4.2127@newsb.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
or ? (I'm using Firefox.)
>
> They do. URL to what you have tried?
>

Re: Why doesn´t width and max-width work?

am 11.01.2008 10:20:40 von Michael Fesser

..oO(palun)

>Sorry, it's not deployed. But the code is really simple:
>
>In html:
>
>


>Some stuff...
>

>
>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

Re: Why doesn´t width and max-width work?

am 11.01.2008 11:22:23 von palun

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).

/ulf

Michael Fesser skrev:
> .oO(palun)
>
>> Sorry, it's not deployed. But the code is really simple:
>>
>> In html:
>>
>>


>> Some stuff...
>>

>>
>> 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

Re: Why doesn´t width and max-width wor k?

am 11.01.2008 11:30:40 von Neredbojias

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.

--
Neredbojias
Riches are their own reward.

Re: Why doesn´twidth and max-width work?

am 11.01.2008 11:32:40 von Ben C

On 2008-01-11, palun 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.

Re: Why doesn´t width and max-width wor k?

am 11.01.2008 11:39:51 von palun

Thanks for your help.
Much appreciated.
/u

Neredbojias skrev:
> 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.
>

Re: Why doesn´t width and max-width work?

am 11.01.2008 11:44:00 von palun

You are right. I should deploy it (though it looks terrible right now).
BTW: I did validate it and that seems ok apart from the
"wicket:id"-attributes on some of the tags (required by the wicket
framework -- great stuff if you know some java)
/u

Ben C skrev:
> On 2008-01-11, palun 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.

Re: Why doesn´t width and max-width work?

am 11.01.2008 12:28:21 von jj

palun wrote:
> You are right.

It's a shame you got any responses at all. You are inconsiderate. You
couldn't be bothered to create an online example of the problem, you
couldn't be bothered to post accurate code, and you couldn't be bothered
to be consistent with everybody else in the group and type your response
below the text you were referring to.

Re: Why doesn´t width and max-width work?

am 11.01.2008 12:44:47 von rf

"palun" wrote in message
news:zrHhj.2632$R_4.2112@newsb.telia.net...
> 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).

I am here to tell you that it works for untold millions of other pages out
there. Why is yours different? I don't bloody know, you won't show it to me!

Again: URL? If you don't supply one then nobody here has a snowflakes chance
in hell of helping you.
--
Richard.

Re: Why doesn´t width and max-width work?

am 11.01.2008 14:45:54 von Chaddy2222

On Jan 11, 10:44=A0pm, "rf" wrote:
> "palun" wrote in message
>
> news:zrHhj.2632$R_4.2112@newsb.telia.net...
>
> > Terribly sorry. My mistake. (I wrote the code in the message. Should hav=
e
> > copied.)
>
> > Anyway, the code is correct in the CSS-file (and it still doesn't work).=

>
> I am here to tell you that it works for untold millions of other pages out=

> there. Why is yours different? I don't bloody know, you won't show it to m=
e!
>
> Again: URL? If you don't supply one then nobody here has a snowflakes chan=
ce
> in hell of helping you.
Well it depends on what browser the Op is useing, IE6 does not support
min and max width. IE7 does though.
--
Regards Chad. http://freewebdesignonline.org

Re: Why doesn´t width and max-width work?

am 11.01.2008 14:53:48 von Michael Fesser

..oO(Chaddy2222)

>On Jan 11, 10:44 pm, "rf" wrote:
>>
>> Again: URL? If you don't supply one then nobody here has a snowflakes chance
>> in hell of helping you.
>
>Well it depends on what browser the Op is useing, IE6 does not support
>min and max width. IE7 does though.

He's on Firefox.

Micha

Re: Why doesn´t width and max-width work?

am 11.01.2008 15:24:42 von Chaddy2222

On Jan 12, 12:53=A0am, Michael Fesser wrote:
> .oO(Chaddy2222)
>
> >On Jan 11, 10:44=A0pm, "rf" wrote:
>
> >> Again: URL? If you don't supply one then nobody here has a snowflakes c=
hance
> >> in hell of helping you.
>
> >Well it depends on what browser the Op is useing, IE6 does not support
> >min and max width. IE7 does though.
>
> He's on Firefox.
>
> Micha
Well good for him then.
It's probably just a mark-up error but who knows the OP did not give
us an URL, how many timse do we need to say / write such advice before
people start actually makeing life easier for all of us by giving us a
URL to a problem.
That was a long rant from me.
--
Regards Chad. http://freewebdesignonline.org

Re: Why doesn´t width and max-width work?

am 11.01.2008 21:19:52 von dorayme

In article ,
"rf" wrote:

> "palun" wrote in message
> news:zrHhj.2632$R_4.2112@newsb.telia.net...
> > 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).
>
> I am here to tell you that it works for untold millions of other pages out
> there. Why is yours different? I don't bloody know, you won't show it to me!
>
> Again: URL? If you don't supply one then nobody here has a snowflakes chance
> in hell of helping you.

O I dunno? Did you see how Boji said trust him and the OP just
fell over in gratitude like it was the biggest revelation since
sliced white bread was announced to the general public?

--
dorayme

Re: Why doesn´t width and max-width work?

am 11.01.2008 21:52:47 von Neredbojias

Well bust mah britches and call me cheeky, on Fri, 11 Jan 2008 20:19:52
GMT dorayme scribed:

> In article ,
> "rf" wrote:

>> Again: URL? If you don't supply one then nobody here has a snowflakes
>> chance in hell of helping you.
>
> O I dunno? Did you see how Boji said trust him and the OP just
> fell over in gratitude like it was the biggest revelation since
> sliced white bread was announced to the general public?

You may enjoy the music vid at

http://www.neredbojias.com/

The broad reminds me of you. (PS: It's Flash and seems to be a bit sticky
at peak times and you may need hi-speed.)

--
Neredbojias
Riches are their own reward.