HighDots Forums  

CSS not being applied

alt.html alt.html


Discuss CSS not being applied in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Dave
 
Posts: n/a

Default CSS not being applied - 01-13-2008 , 08:46 PM






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.

Reply With Quote
  #2  
Old   
asdf
 
Posts: n/a

Default Re: CSS not being applied - 01-13-2008 , 08:53 PM







"Dave" <david.mh.tong (AT) gmail (DOT) com> wrote

Quote:
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">




Reply With Quote
  #3  
Old   
asdf
 
Posts: n/a

Default Re: CSS not being applied - 01-13-2008 , 08:56 PM




"asdf" <asdf (AT) asdf (DOT) com> wrote

Quote:
"Dave" <david.mh.tong (AT) gmail (DOT) com> wrote in message
news:32c6d3c3-69df-4a64-ab42-2a6fc9263a8d (AT) k39g2000hsf (DOT) googlegroups.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>




Reply With Quote
  #4  
Old   
Dave
 
Posts: n/a

Default Re: CSS not being applied - 01-13-2008 , 09:14 PM



On Jan 14, 1:56 pm, "asdf" <a... (AT) asdf (DOT) com> wrote:
Quote:
"asdf" <a... (AT) asdf (DOT) com> wrote in message

news:478acece$0$30858$5a62ac22 (AT) per-qv1-newsreader-01 (DOT) iinet.net.au...





"Dave" <david.mh.t... (AT) gmail (DOT) com> wrote in message
news:32c6d3c3-69df-4a64-ab42-2a6fc9263a8d (AT) k39g2000hsf (DOT) googlegroups.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!


Reply With Quote
  #5  
Old   
Neredbojias
 
Posts: n/a

Default Re: CSS not being applied - 01-13-2008 , 10:38 PM



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

Quote:
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.


Reply With Quote
  #6  
Old   
GTalbot
 
Posts: n/a

Default Re: CSS not being applied - 01-13-2008 , 11:07 PM



On 13 jan, 21:46, Dave <david.mh.t... (AT) gmail (DOT) com> wrote:
Quote:
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,

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

http://www.w3.org/TR/CSS21/fonts.htm...ef-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...te_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...my_CSS_code.3F

Why we won't help you by Mark Pilgrim
http://diveintomark.org/archives/200..._wont_help_you

Regards, Gérard
--
Internet Explorer 7 bugs
http://www.gtalbot.org/BrowserBugsSection/MSIE7Bugs/


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.