HighDots Forums  

CSS for H1 tag

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS for H1 tag in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JA
 
Posts: n/a

Default CSS for H1 tag - 03-21-2008 , 08:27 PM






Hi,

I need to put my product titles in an h1 tag, but still keep the font the
same size it is now, plus, not change the size of any other h1 tags
throughout the site.

How would I do this? My site has a style sheet, but I don't know much about
css. But I can copy and paste!

Thanks, J



Reply With Quote
  #2  
Old   
Jeremy
 
Posts: n/a

Default Re: CSS for H1 tag - 03-21-2008 , 08:39 PM






JA wrote:
Quote:
Hi,

I need to put my product titles in an h1 tag, but still keep the font the
same size it is now, plus, not change the size of any other h1 tags
throughout the site.

How would I do this? My site has a style sheet, but I don't know much about
css. But I can copy and paste!

Thanks, J


For your markup:

<h1 class="product-title">Magic Wonder Box</h1>



For your CSS:

h1.product-title
{
font-size: inherit;
}


Reply With Quote
  #3  
Old   
JA
 
Posts: n/a

Default Re: CSS for H1 tag - 03-21-2008 , 10:07 PM



Thanks Jeremy!

That did it!


"Jeremy" <jeremy (AT) pinacol (DOT) com> wrote

Quote:
JA wrote:
Hi,

I need to put my product titles in an h1 tag, but still keep the font the
same size it is now, plus, not change the size of any other h1 tags
throughout the site.

How would I do this? My site has a style sheet, but I don't know much
about css. But I can copy and paste!

Thanks, J

For your markup:

h1 class="product-title">Magic Wonder Box</h1



For your CSS:

h1.product-title
{
font-size: inherit;
}



Reply With Quote
  #4  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: CSS for H1 tag - 03-22-2008 , 03:12 AM



Scripsit JA:

Quote:
Thanks Jeremy!

That did it!
So you didn't actually test it, and neither did Jeremy. You didn't
bother even testing it on the two most widely used browsers, namely IE 6
and IE 7. (They don't support the value inherit, for any property.)

What you really _need_ to do is to reconsider this:

Quote:
I need to put my product titles in an h1 tag, but still keep the
font the same size it is now, plus, not change the size of any
other h1 tags throughout the site.
You might be able to cheat some search engines some of the time, but the
punishment will come. For example, Google has some useful information
for web authors. It's much more useful than the information that "search
engine optimization" snakeoil merchants sell you.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.