Need help with Footer

Discussion in 'CSS' started by random0, Jul 12, 2008.

  1. #1
    Hi, I have been editing my wordpress theme. I need help with footer part.

    For the header, I have one black stripe going from left hand side to right hand side. It's an image, repeating in -X axis.

    background:url(img/back.gif) repeat-x;
    
    Code (markup):


    I have my content centered.

    For the footer, I want to have a stripe going from left hand side to right hand (full) just like the header. I still want to put the footer content in center.

    I just realized that I cant post links yet. So I won't be able to post my site here. Can anyone help me with this?

    Edit:
    Please check my profile for the website.
     
    random0, Jul 12, 2008 IP
  2. priyakochin

    priyakochin Banned

    Messages:
    4,740
    Likes Received:
    138
    Best Answers:
    0
    Trophy Points:
    0
    #2
    why can't you make the alignment as center ?
     
    priyakochin, Jul 12, 2008 IP
  3. random0

    random0 Member

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #3
    What? Are you saying that I should leave my footer as it is (centered, only 800px in width)?

    What i'm trying to do is to have a full footer* and have my footer content centered to 800px in width.

    *a 100% div (not within my content) within html body.
     
    random0, Jul 12, 2008 IP
  4. kirandesign

    kirandesign Banned

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    make footer alignment center <div align ="center"> </div> if you don't know how to do it contact me any time and i will add these lines to your css and footer .
     
    kirandesign, Jul 13, 2008 IP
  5. Maujor

    Maujor Peon

    Messages:
    30
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Do the following:

    1-) In order to have a stripe going from left hand side to right hand (full) just like the header you must firstly put the div#footer as direct child of the body.
    Move the #footer to immediatly before the </body>.
    Put some content there like:
    <div id="footer">
    <p>Some test content</p>
    </div>
    </body>
    </html>
    Code (markup):
    2-) Then add the CSS rule:

    #footer {
    clear:both;
    color:#fff;
    text-align:center;
    width:100%;
    background:#000;
    }
    Code (markup):
     
    Maujor, Jul 13, 2008 IP
  6. random0

    random0 Member

    Messages:
    17
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    36
    #6
    Fixed. I was missing closing tags of my page wrapper. Thanks.
     
    random0, Jul 13, 2008 IP