Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8197061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T05:39:49+00:00 2026-06-07T05:39:49+00:00

Relative CSS/bootstrap newbie. I’ve spent a while trying to get a background image to

  • 0

Relative CSS/bootstrap newbie.

I’ve spent a while trying to get a background image to integrate with Twitter Bootstrap using the first method on this CSS Tricks page. I wound up using “body” as the CSS tag because HTML just… didn’t work. While everything is working fine in general, the image is starting “behind” the top navbar and then extending downward, so the top is hidden behind the black navbar

I’ve tried using margin-top to align the top of the background image with the bottom of the navbar, but that also moves the container and all further content down as well (obviously, since I’m putting a margin on the full body of the page).

I’ve also tried creating a unique class for the background image (backgroundimage), and putting a div immediately inside the body tag and closing the div right before the html close tag, but once again, adjusting it adjusts all the page content, not just the background image.

Moving the div for the background-image below the navbar confines it to the active “container” space, so the background-image now only exists in the middle third of the screen.

body { 
    background: url(../images/height-chart500w.png) repeat-y fixed; 
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: 15%;
}

Given the resizing properties of background-image, the hacky solution of just changing the image itself to create a space at the top obviously won’t work. How do I CSS that background-image down below the navbar?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T05:39:51+00:00Added an answer on June 7, 2026 at 5:39 am

    Use background-position. It takes two values: one for the x axis, the other for the y axis. In your case it’d be something like:

    background-position: 0 Y; where Y would be the height of the navbar.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using some components from twitter bootstrap css and have combined into a custom
I'm using Twitter Bootstrap as a framework on my Ruby on Rails application. I
so evidently according to this Using relative URL in CSS file, what location is
In CSS, any image path is relative to the CSS file location. f.ex if
I have a number of images that are lined up together relative using css,
How to use custom variables when using twitter-bootstrap-rails gem? I want to change the
I want to position an element in normal css relative to the element before
I have a <div id=outer> which has the following css: position:relative; width:300px; height:125px; float:left;
My Css #container{ display:block; } #container ul{ list-style:none; position:relative; margin:0px; padding:0px; display:block; } #container
I have a container div with the following CSS: #container { position:relative; overflow:hidden; width:200px;

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.