Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / December 2003



Tip: Looking for answers? Try searching our database.

Make an H2 an H3?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
e n | c k m a - 26 Dec 2003 21:28 GMT
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.
Edward Alfert - 26 Dec 2003 21:57 GMT
<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;
}

Signature

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

Jukka K. Korpela - 26 Dec 2003 23:18 GMT
> 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.

Signature

Yucca, http://www.cs.tut.fi/~jkorpela/

e n | c k m a - 27 Dec 2003 16:51 GMT
> 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.
e n | c k m a - 28 Dec 2003 01:04 GMT
> 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.
A Hess - 28 Dec 2003 07:14 GMT
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
[quoted text clipped - 10 lines]
> 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.
Neal - 28 Dec 2003 19:12 GMT
> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.