By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

Make an H2 an H3?

P: n/a
If you are designing a site, you realise that structurally you need a
particular heading to be an H2 but you would prefer the look of the H3 style
you created (for this particular purpose).

Is there a more efficient way of making your H2 look exactly the same as the
H3 without creating a seperate class for it?

Thanks,
Nick.
Jul 20 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
<snip>
Is there a more efficient way of making your H2 look exactly the same
as the H3 without creating a seperate class for it?

<snip>

You do not need to create a class to define the look of any HTML tag. You
can override the default look of any tag.

h2 {
font-size: large;
font-weight: bold;
}

--
Edward Alfert - http://www.rootmode.com/
Discount Code (Recurring 25% Off): newsgroup
Multiple Domain Hosting * Reseller Hosting
Free IP Addresses * Private Label Nameservers
Jul 20 '05 #2

P: n/a
"e n | c k m a" <bo*@marley.com> wrote:
If you are designing a site, you realise that structurally you need
a particular heading to be an H2 but you would prefer the look of
the H3 style you created (for this particular purpose).
I wonder what that particular purpose might be. Wouldn't it be
misleading to make a 2nd level heading look the same as 3rd level
headings?
Is there a more efficient way of making your H2 look exactly the
same as the H3 without creating a seperate class for it?


Why would you refrain from creating a class for it? It's just an
attribute, say <h2 class="quasi-h3">, and an added selector,
h3, h2.quasi-h3 { /* your h3 styling */ }

In theory, you could also use an id attribute and a #quasi-h3 selector,
or a contextual selector, but this would depend on the context and
wouldn't work on IE.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Jul 20 '05 #3

P: n/a
> Why would you refrain from creating a class for it? It's just an
attribute, say <h2 class="quasi-h3">, and an added selector,
h3, h2.quasi-h3 { /* your h3 styling */ }


Aaah, thanks! I haven't learnt all those nifty CSS things yet (like the "h3
[comma] h2.quasi"). I really need a CSS book methinks.

And I only just found out about the multiple classes assignment
[class="test1 test2 test3"] recently!

Well, you learn something new every day :)

tah,
Nick.
Jul 20 '05 #4

P: n/a
> I wonder what that particular purpose might be. Wouldn't it be
misleading to make a 2nd level heading look the same as 3rd level
headings?


Because there aren't any H2's on the page I'm changing at the moment. I
wanted the look of the H3's because they look better when they're alone
(without any H2s) and I thought that structurally, they should probably be
H2's.

Basically, it's for a 'contact us' page where the different sections discuss
different methods of contact. URL:http://144.132.34.224/style/contact.php

Thanks,
Nick.
Jul 20 '05 #5

P: n/a
Somewhere around 12/27/03 5:04 PM, e n | c k m a typed wildly with
reckless abandon:
I wonder what that particular purpose might be. Wouldn't it be
misleading to make a 2nd level heading look the same as 3rd level
headings?

Because there aren't any H2's on the page I'm changing at the moment. I
wanted the look of the H3's because they look better when they're alone
(without any H2s) and I thought that structurally, they should probably be
H2's.

Basically, it's for a 'contact us' page where the different sections discuss
different methods of contact. URL:http://144.132.34.224/style/contact.php

Thanks,
Nick.


Then make the h3's into h2's and change the stylesheet
<http://144.132.34.224/style/images/screen.css> to give the h2's the
h3's attributes.
Jul 20 '05 #6

P: n/a

"e n | c k m a" <bo*@marley.com> wrote in message
news:j_******************@news-server.bigpond.net.au...
Because there aren't any H2's on the page I'm changing at the moment. I
wanted the look of the H3's because they look better when they're alone
(without any H2s) and I thought that structurally, they should probably be
H2's.


h1 is primary heading, h2 is secondary. h3 is a tertiary heading. If there
are no h2s, there's no purpose in an h3.

Don't get hung up on how things look when the browser renders it. Let the
browser make h2's look like h2's etc. and mark up based on what the function
of the text really is. Then you can style away, knowing the structure of the
page is correct.

Jul 20 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.