467,161 Members | 1,010 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,161 developers. It's quick & easy.

assistance with css - h1 styling in two different div that are differentclasses

I'm working on this website at

http://members.shaw.ca/sharethemusic/index.htm

I'm trying to figure out how to style headers so that I can have
different styles for different areas of my page..

I'm using one of those two column flowing layouts with a header, a
footer, a nav bar and a content section..

I want the h1 and h2 elements to be different if they are in the header
div/class than if they are in the content div/class however, when I try
to change the styling of the headers in the #top section, its changing
some of the headers in the #content section too..

I can't figure out how it works..

I tried doing something like this

#top h1,h1 {rules}

#content h1, h1, {rules}

that didn't work..

#top h1,h2 {rules}

#content h1, h2 {rules}

that didn't work either...

am I even in the right ballpark??

Apr 12 '07 #1
  • viewed: 9794
Share:
1 Reply
Els
Helen Martin wrote:
http://members.shaw.ca/sharethemusic/index.htm

I'm trying to figure out how to style headers so that I can have
different styles for different areas of my page..
I want the h1 and h2 elements to be different if they are in the header
div/class than if they are in the content div/class however, when I try
to change the styling of the headers in the #top section, its changing
some of the headers in the #content section too..
#top h1,h1 {rules}
That means any h1 that is inside #top, as well as any other h1.
#content h1, h1, {rules}
That means any h1 that is inside #content, as well as any other h1,
except that the last comma will probably mean the rules don't get
applied.
that didn't work..
True.

Try just this:
#top h1{rules}
#content h1{rules}

And if you ever doubt what a certain selector applies to, check with
the selectoracle:

http://gallery.theopalgroup.com/selectoracle/

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Apr 12 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

5 posts views Thread by Peter Collinson | last post: by
8 posts views Thread by news@celticbear.com | last post: by
61 posts views Thread by phil-news-nospam@ipal.net | last post: by
6 posts views Thread by ashkaan57@hotmail.com | last post: by
4 posts views Thread by Eric Lindsay | last post: by
40 posts views Thread by Jukka K. Korpela | last post: by
2 posts views Thread by shapper | last post: by
1 post views Thread by Munna | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.