Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 3 1 2 3 LastLast
Results 1 to 10 of 21
  1. #1
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    How do I modify my h1 tags using CSS? Like so?
    Code:
    h1 {
    font-size: 16pt;
    font-weight: bold;
    Is this correct or do I need to use another method?
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  2.  

  3. #2
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    Add a } to the end and you're done

    Also remember that h1 tags have by default margin/padding and they dont' display inline. I like to add the following to my tags so I can deal with them easier

    Code:
    h1, div, form{
      display:inline;
      margin:0px;
      padding:0px;
    }
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  4. #3
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    Cheers Brak.. By 'displaying inline' what exactly do you mean, I'm likely to use them as headings before a paragraph (using <p> tags), does this matter?
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  5. #4
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    By it doesn't display inline I mean if you have text like:
    Code:
    <h1>My Heading</h1> - let's keep this text on the same line.
    It's going to display like:

    My Heading

    -lets keep this text on the same line

    And will be impossible for you to keep it on the same line without using the display:inline property. It basically forces the <h1> tag to have a separate line to itself (just like the code tags work on wdf).
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  6. #5
    Senior Member justlivyalife's Avatar
    Join Date
    Jul 2003
    Location
    Birmingham, UK
    Posts
    2,871
    Member #
    2374
    Okay, thanks!
    justlivyalife - The future depends on what we do in the present. (Mahatma Gandhi)
    WDF Resources: WDF Rules
    Non-WDF: JavascriptSource | Dynamic Drive | phpBB | HTML-Kit | Winamp | Download Firefox | Morguefile

  7. #6
    Junior Member
    Join Date
    Apr 2004
    Posts
    8
    Member #
    5584
    i would recommend using headers as block elements, if you want to remove the the line instead of changing the display to inline try setting the bottom margin or padding property to a negative number

    margin-bottom: -3px;

  8. #7
    Senior Member glyakk's Avatar
    Join Date
    Nov 2003
    Location
    USA
    Posts
    1,263
    Member #
    3828
    Liked
    6 times
    Originally posted by biggreenfish
    i would recommend using headers as block elements, if you want to remove the the line instead of changing the display to inline try setting the bottom margin or padding property to a negative number

    margin-bottom: -3px;
    There is nothing wrong with setting any element to inline..


  9. #8
    Junior Member
    Join Date
    Apr 2004
    Posts
    8
    Member #
    5584
    there's nothing "wrong" with using display, but the w3 recommendation on creating your own tags is ill-advised. browsers are having trouble with the display value "inline", even the current popular ones. spacing a block element is generally quite accepted.

  10. #9
    Senior Member Brak's Avatar
    Join Date
    Apr 2003
    Location
    San Francisco, CA
    Posts
    3,413
    Member #
    1217
    Liked
    2 times
    creating your own tags? What are you talking about?

    h1 is a heading tag, you can't create your own tags in HTML.

    Also I've not found a single browser that has a problem with dislplay:inline, do you have any examples?
    Kyle Neath: Rockstar extraordinare
    The blog | The poetry site | The Spore site

  11. #10
    Junior Member
    Join Date
    Apr 2004
    Posts
    8
    Member #
    5584
    w3 recommendation regarding creating your own tags is a topic, throughout the topic the display property is discussed beyond the scope of class and id selectors, and browser's that have quirks with the value "inline", here's a view http://www.blooberry.com/indexdot/cs...fy/display.htm


Page 1 of 3 1 2 3 LastLast

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:44 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com