1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change h1 Formatting in CSS

Discussion in 'Search Engine Optimization (SEO)' started by Safari, Jul 17, 2009.

  1. Safari

    Safari New Member

    Joined:
    Oct 16, 2007
    Messages:
    183
    Likes Received:
    17
    Trophy Points:
    0
    I want to use <h1> tags in my header but I do not want the text to be huge like the default <h1>.

    I have tried something like:
    h1 {
    font-size: 11;
    }

    Also whenever I have h1 I dont know why but the content does not remain in one line

    Say

    This is something that should not be in h1 and<h1> this should be in h1</h1>

    Outputs

    This is something that should not be in h1 and
    this should be in h1

    But I want it to be

    This is something that should not be in h1 and this should be in h1
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    It should work

    h1 { font-size: 11pt; }

    Just add pt

    Also for the line break problem add display:inline;

    h1 { font-size: 11pt; display:inline;}
     
  3. naimish

    naimish New Member

    Joined:
    Jun 29, 2009
    Messages:
    1,046
    Likes Received:
    18
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    On Earth
    h1 { font-size: 11pt; display:inline;}

    Seems its works for me....what about you Safari ?
     
  4. Safari

    Safari New Member

    Joined:
    Oct 16, 2007
    Messages:
    183
    Likes Received:
    17
    Trophy Points:
    0
    Yeah it worked as expected :D
     
    naimish likes this.
  5. nimesh

    nimesh New Member

    Joined:
    Apr 13, 2009
    Messages:
    770
    Likes Received:
    20
    Trophy Points:
    0
    Occupation:
    Oracle Apps Admin
    Location:
    Mumbai
    Home Page:
    Even I was troubled with the line break problem.

    Thanks.
     
  6. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,285
    Likes Received:
    364
    Trophy Points:
    83
    The pleasure is all mine :D
     

Share This Page