SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    690
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How can you force a background to appear in the footer?

    I want to have a black background on the page, and I only want it to be like 75px in height and cover up the whole footer from where it starts?

  2. #2
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Use background-repeat:repeat-x or background-repeat:no-repeat to make the image repeat horizontally only or not at all.

    You can also use background-position to set where the background image is displayed.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  3. #3
    SitePoint Guru
    Join Date
    Apr 2007
    Posts
    690
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you do something liKe:

    position: absolute; bottom: 0px; left: 0px;

  4. #4
    SitePoint Wizard rguy84's Avatar
    Join Date
    Sep 2005
    Location
    Durham, NC
    Posts
    1,659
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    what about
    HTML Code:
    <div style="color:#fff;background-color:#000;position:absolute;bottom:0;left:0;">
    This is a black box with white text
    </div>
    Ryan B | My Blog | Twitter

  5. #5
    CSS & JS/DOM Adept bronze trophy
    Join Date
    Mar 2005
    Location
    USA
    Posts
    5,482
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure, you can use absolute positioning if that's the affect you want to achieve. Your question wasn't very clear.
    We miss you, Dan Schulz.
    Learn CSS. | X/HTML Validator | CSS validator
    Dynamic Site Solutions
    Code for Firefox, Chrome, Safari, & Opera, then add fixes for IE, not vice versa.

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,514
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    As Kravvitz said your question is a little ambiguous for use to give you the correct answer. Please provide detailed information so we can help you.

    Remember that a footer is not an html or css element and only means something in the context of how you have coded it.

    You may have a fixed positioned element as a footer or you may have an absolutely placed element as a footer or indeed you may just have a static footer that moves up and down with the flow of the page (not to mention my footer at the bottom of the window technique).

    Therefore our answer would be different for every scenario of the above and one answer won't cover all eventualities.

    You need to help us to help you


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
  •