PDA

View Full Version : CSS Paragraph styles...is it possible?



wiccaninquesnel
07-09-2002, 03:52 AM
Hey...

I am relearning HTML and building a site with my wife. We are using an external CSS and using that to set our header <hx> styles etc.

I was wondering, I found mention of setting paragraph styles...and how would I do it?

Here is an example of what I am trying to do.


This on works:
h1 {font-weight: bolder;
font-size: 40pt;
color: #115ffd;
}

This one doesn't:
p1 {color: #115ffd;
text-align: justify;
font-size: 13pt;
}

Can it even be done? Am I repeating a post from earlier...I browsed them all, but couldn't find anything regarding this.

Jumpman
07-09-2002, 04:20 AM
Either get rid of the "1" after the p, or set up a class system and put a period between the p and the 1. I think that should work...

wiccaninquesnel
07-09-2002, 07:43 AM
p.1 {color: #115ffd;
text-align: justify;
font-size: 13pt;
}

So something like the above would work? How would I use it in the HTML...

<P.1>
<P1>

Or something else entirely. Does anyone know a tutorial I can find on this so that I don't have to keep asking lots of silly questions????

PS..thanks for the quick reply.

ronaldb66
07-09-2002, 09:40 AM
The "1" is the name of the class you specified for the P elements; using it goes like:

<p class="1"> ...

(although i could thing of better names... :D)

Tutorials on CSS can, among others, be found here:

http://www.w3schools.com/css/default.asp

and here:

http://hotwired.lycos.com/webmonkey/authoring/stylesheets/