Forum Moderators: not2easy

Message Too Old, No Replies

What am I doing wrong

each paragraph needs class

         

Acternaweb

2:57 pm on Feb 17, 2004 (gmt 0)

10+ Year Member



I thought one <span class="text"> would cover the entire page, like the way <font face> does. Am I wrong?

I have a page with several paragraphs but each paragraph needs a class. What do I have wrong?

Thanks,

RammsteinNicCage

3:02 pm on Feb 17, 2004 (gmt 0)

10+ Year Member



If you want it to affect the entire page, how about adding it to the body css effects?

<style type="text/css">
body {color:#00ff00;}
</style>

Jennifer

choster

3:26 pm on Feb 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Or if you only want the style applied to paragraphs, you can use

p {color:#0f0;}

Or if you want it applied to paragraphs, list items, and table cells, you could use

p,li,td,th,dd {color:#0f0;}

Or if you want it applied only to paragraphs inside a div named "text," you could say

div#text p {color:#0f0;}

Acternaweb

3:39 pm on Feb 17, 2004 (gmt 0)

10+ Year Member



I have tried use body but it doesn't work. I am not trying to change the color, only the font face and size. Does it matter if I use <span class> or <div class>?

Thanks

Acternaweb

3:58 pm on Feb 17, 2004 (gmt 0)

10+ Year Member



UGH Nevermind, I had a freaking typo. Anyway to get back the lost hair? LOL

Thanks for the help

DrDoc

4:43 pm on Feb 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can't put block level elements (such as p,div,ul,ol,hn) inside an inline level element (such as span,a,cite,q,img).

So yes, it matters if you use div vs. span :)

ergophobe

9:36 pm on Feb 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



DrDoc,

Sure you can. It just isn't valid and may or may not work, depending on how the browser handles it. But you can do it ;-)