SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Headers

  1. #1
    SitePoint Guru
    Join Date
    Jul 2000
    Location
    Long Island, NY
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Headers

    I'm going to start converting an older site to CSS. I'm not planning on doing anything with line-spacing throughout most of the site, but I want the headers to just have the same spacing as the rest of the text and just visually show them by font-size, bold, caps, etc. Can anyone tell me how to specify that..just the spacing part, I mean, in my stylesheet? Thanks in advance.

  2. #2
    .net install meltdown
    Join Date
    May 2001
    Location
    View Ridge
    Posts
    692
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try experimenting with the "line-height" property.

    More info: http://www.w3.org/TR/REC-CSS1#line-height

    HTH

  3. #3
    SitePoint Wizard Ian Glass's Avatar
    Join Date
    Oct 2001
    Location
    Beyond yonder
    Posts
    2,384
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm a bit lost on what you want to do. From the understanding I have now, I too would suggest the line-height property, but I think there may be others that can apply too. Can you explain it a little more or give a link or something? :-)

    ~~Ian

  4. #4
    SitePoint Member
    Join Date
    Jan 2002
    Location
    USA
    Posts
    19
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You mean you want the same amount of white space around header tags (<h1>, etc.) and paragraph tags and everything?

    You'd use margin settings to mess with that in CSS. Try setting them to 0.

  5. #5
    SitePoint Guru
    Join Date
    Jul 2000
    Location
    Long Island, NY
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What I'm doing now, with the old HTML is not using any headers. I know that's wrong and css will allow me to use them and still be able to control how they look. The text on the site is verdana, arial, etc., size 2. I figure to make that 80% and it'll look about the same to most people. The part that logically should be Header 1 is also size 2, all caps and bold. It's set in a colored table row and I don't want any extra spacing around it because that'll make the row too thick. I figure that might be line-height, but I haven't used that and don't really know how it works.

    As long as I'm asking stuff..if the font size is 80% for the body, td, p, ul, ol, and so forth, then when I do want it bigger, how do I figure that out? Just play around with it? Because it seems when you use a percentage for all the text it seems that when you specify a different percentage for something in particular it sees it as a percentage of the default percentage you've already set. Is that right? I hope someone understands that, because reading it over I'm not sure I do anymore.

    Anyway, thanks for the help and suggestions.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •