2
votes

I have a bootstrap theme for my WordPress site and I'm trying to recreate the theme in another page.

www.bleep.io/blog

The theme has a grey background but the container div is white - giving the impression of a grey border.

I've tried to recreate this by setting the body background color and the container background to white. But this turns the nav-bar white too.

Any ideas how I do this?

2
Give the navbar an explicit colour in that case? Hard to tell without an example. Can you link to your project so we can see what's going on? - user463231
This is the page I have made: bleep.io/contact.html - Nick Latocha
@Mat I tried your suggestion and gave the navbar a specific background. Seemed to work www.bleep.io/contact2.html - Nick Latocha
Cool, glad you got it working. - user463231

2 Answers

2
votes

Hi there from what you are saying you want to have a white background same as the twitter bootstrap css design but you can't change the body to white.

So you need to find this code as your body has a class added to it's tag, find for this in your page template (should be just before the <body> tag):

<style type="text/css" id="custom-background-css">
body.custom-background { background-color: #d4d4d4; }
</style>

that is what you are looking for to change the background color.

EDIT:

Try finding and changing this:

.container {
background-color: #D4D4D4;
margin: 0px auto;
padding-right:24px;
padding-left:24px;
}

and this:

<style>
body {
padding-top: 60px; 
}
</style>

Please also check your css file on the page http://www.bleep.io/contact.html as it's a broken link and it may be the cause of that:

<link href="assets/css/bootstrap-responsive.css" rel="stylesheet">
2
votes

You should probably refrain from editing the main bootstrap files. Additional files are provided for you to perform customizations. Look for the main.css and the main.js files in the appropriate directory locations.

This will help prevent a total breakage on the site, and should be easier to fix and troubleshoot if the need arises.

This is of course for these types of minor changes. If you are creating an entire theme: go for it.