Forum Moderators: mack
I have only just started and am using an internal style sheet.
Thing is I want to use <H1> of different color and font but seems that once you depict there style they are all the same.
I must be tired but P is all text in paragraphs? I want this in many different fonts colors postions how I define each different paragraph a different style?
and it's not only colors. Borders, background-images, fonts, positions etc etc....
[w3.org ]
Have fun!
Nick
For instance, on one site I did I used a class for all of the <p>'s in the main content <div>. Then it dawned on me that this was not efficient. every paragraph was like this:
<p class="main">
content
</p>
Instead you could use this in your style sheet:
.content p{your styles here}
where .main is the containing div:
<div class="content">
So now all <p>'s in the div named "content" will display how you want them and <p> not in the div "content" will display to the default setting for p.
I hope I made some sense here;)
They're not pseudo classes though. That's just a neat way of selecting elements.
There are four types of pseudo class
Nick
From me:
I hope I made some sense here
I really do love that CSS feature, though. External CSS is a very powerful tool when it comes to efficiency. Boy do I remember when I had to change 100 pages, one by one. Not fun:(
These days I'm always trying to think ahead. I'm experimentint with dynamic menus now so I can add a link sitewide in a few minutes. Awesome!
Dino, good luck with CSS! You will never look back once you get through the initial learning stage. I personally like W3 Schools' [w3schools.com] resource.
Birdman