CSS not being applied

The following embedded CSS class is not being applied and I don't
under stand why?

Any help would be appreciated.

<script type="text/css">
.msg_alert {
text-weight: bold;
font-size: 1em;
color: red;
}
</script>

<div class="msg_alert">This should work!</div>

Thanks in advance.
dave [ Mo, 14 Januar 2008 03:46 ] [ ID #1907832 ]

Re: CSS not being applied

"Dave" <david.mh.tong [at] gmail.com> wrote in message
news:32c6d3c3-69df-4a64-ab42-2a6fc9263a8d [at] k39g2000hsf.google groups.com...
> The following embedded CSS class is not being applied and I don't
> under stand why?
>
> Any help would be appreciated.
>
> <script type="text/css">
> .msg_alert {
> text-weight: bold;
> font-size: 1em;
> color: red;
> }
> </script>
>
> <div class="msg_alert">This should work!</div>
>
> Thanks in advance.

Try replacing:

<script type="text/css">

....with:

<style type="text/css">
23s [ Mo, 14 Januar 2008 03:53 ] [ ID #1907833 ]

Re: CSS not being applied

"asdf" <asdf [at] asdf.com> wrote in message
news:478acece$0$30858$5a62ac22 [at] per-qv1-newsreader-01.iinet.n et.au...
>
> "Dave" <david.mh.tong [at] gmail.com> wrote in message
> news:32c6d3c3-69df-4a64-ab42-2a6fc9263a8d [at] k39g2000hsf.google groups.com...
>> The following embedded CSS class is not being applied and I don't
>> under stand why?
>>
>> Any help would be appreciated.
>>
>> <script type="text/css">
>> .msg_alert {
>> text-weight: bold;
>> font-size: 1em;
>> color: red;
>> }
>> </script>
>>
>> <div class="msg_alert">This should work!</div>
>>
>> Thanks in advance.
>
> Try replacing:
>
> <script type="text/css">
>
> ...with:
>
> <style type="text/css">
>

....and before the pedants get me...

Also replace:

</script>

with:

</style>
23s [ Mo, 14 Januar 2008 03:56 ] [ ID #1907834 ]

Re: CSS not being applied

On Jan 14, 1:56 pm, "asdf" <a... [at] asdf.com> wrote:
> "asdf" <a... [at] asdf.com> wrote in message
>
> news:478acece$0$30858$5a62ac22 [at] per-qv1-newsreader-01.iinet.n et.au...
>
>
>
>
>
> > "Dave" <david.mh.t... [at] gmail.com> wrote in message
> >news:32c6d3c3-69df-4a64-ab42-2a6fc9263a8d [at] k39g2000hsf.googl egroups.com...
> >> The following embedded CSS class is not being applied and I don't
> >> under stand why?
>
> >> Any help would be appreciated.
>
> >> <script type="text/css">
> >> .msg_alert {
> >> text-weight: bold;
> >> font-size: 1em;
> >> color: red;
> >> }
> >> </script>
>
> >> <div class="msg_alert">This should work!</div>
>
> >> Thanks in advance.
>
> > Try replacing:
>
> > <script type="text/css">
>
> > ...with:
>
> > <style type="text/css">
>
> ...and before the pedants get me...
>
> Also replace:
>
> </script>
>
> with:
>
> </style>

I am such a knob!

Cheers mate!
dave [ Mo, 14 Januar 2008 04:14 ] [ ID #1907835 ]

Re: CSS not being applied

Well bust mah britches and call me cheeky, on Mon, 14 Jan 2008 03:14:25
GMT Dave scribed:

>> >> The following embedded CSS class is not being applied and I don't
>> >> under stand why?
>>
>> >> Any help would be appreciated.
>>
>> >> <script type="text/css">
>> >> .msg_alert {
>> >> text-weight: bold;
>> >> font-size: 1em;
>> >> color: red;
>> >> }
>> >> </script>
>>
>> >> <div class="msg_alert">This should work!</div>
>>
>> >> Thanks in advance.
>>
>> > Try replacing:
>>
>> > <script type="text/css">
>>
>> > ...with:
>>
>> > <style type="text/css">
>>
>> ...and before the pedants get me...
>>
>> Also replace:
>>
>> </script>
>>
>> with:
>>
>> </style>
>
> I am such a knob!
>
> Cheers mate!

Wow, how ironic! When I read your original posting, I thought to myself,
"This guy is dumber than a doorknob." Btw, is your first name
"Dangerous"?

<grin>

--
Neredbojias
Riches are their own reward.
Neredbojias [ Mo, 14 Januar 2008 05:38 ] [ ID #1907839 ]

Re: CSS not being applied

On 13 jan, 21:46, Dave <david.mh.t... [at] gmail.com> wrote:
> The following embedded CSS class is not being applied and I don't
> under stand why?
>
> Any help would be appreciated.
>
> <script type=3D"text/css">
> .msg_alert {
> text-weight: bold;
> font-size: 1em;
> color: red;
> }
> </script>
>
> <div class=3D"msg_alert">This should work!</div>
>
> Thanks in advance.

Dave,

text-weight is not a valid CSS property name. font-weight is:

http://www.w3.org/TR/CSS21/fonts.html#propdef-font-weight

If you had checked your code with a HTML validator or an online HTML
validation service and with a CSS validator, both errors (<script>
instead of <style> and text-weight) would have been reported.

Reading suggestions:

Using Web Standards in your Web Pages:Making your page using web
standards - how to
2.1 Where can I validate my webpages? How to validate webpages?
http://developer.mozilla.org/en/docs/Using_Web_Standards_in_ your_Web_Pages:M=
aking_your_page_using_web_standards_-_how_to#Where_can_I_val idate_my_webpage=
s.3F_How_to_validate_webpages.3F

Using Web Standards in your Web Pages:Making your page using web
standards - how to
3.1 Where can I validate my CSS code?
http://developer.mozilla.org/en/docs/Using_Web_Standards_in_ your_Web_Pages:M=
aking_your_page_using_web_standards_-_how_to#Where_can_I_val idate_my_CSS_cod=
e.3F

Why we won't help you by Mark Pilgrim
http://diveintomark.org/archives/2003/05/05/why_we_wont_help _you

Regards, G=E9rard
--
Internet Explorer 7 bugs
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/
GTalbot [ Mo, 14 Januar 2008 06:07 ] [ ID #1907842 ]
Miscellaneous » alt.html » CSS not being applied

Vorheriges Thema: Why can't I change height with <col width="50" height="100">?
Nächstes Thema: Formular data exchange: Is the code cleanly HTML?