CSS - Need some help with Wordpress Header

Discussion in 'CSS' started by redmanteam, Sep 2, 2008.

  1. #1
    In my wordpress theme, I have

    <h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1> <h2><?php bloginfo('description'); ?></h2>

    Regardless of what I put in the css file, the theme name and description always end up on two seperate lines. How do I get them on one single line?

    I do need to keep the H tags around the two lines so that I can style them individually, but I'd really like to have them on 1 line.

    Thank you
     
    redmanteam, Sep 2, 2008 IP
  2. webdesigner

    webdesigner Well-Known Member

    Messages:
    489
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    110
    #2
    H1 and H2 are block elements and by default take up the whole line.

    Use something like the css below to get them onto 1 line.

    h1, h2 { display:inline-block;}
    Code (markup):
     
    webdesigner, Sep 2, 2008 IP
  3. mypsdtohtml

    mypsdtohtml Guest

    Messages:
    96
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Try to put in the CSS h1 and h2 together

    h1, h2 { etc...}

    However h1 or h2 will take one line each
     
    mypsdtohtml, Sep 2, 2008 IP
  4. redmanteam

    redmanteam Peon

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks, this worked well in Firefox, but IE7 didn't recognize this. Is there something similar that could be used that would work in FF and IE?
     
    redmanteam, Sep 2, 2008 IP