Reputation: 43
I have a design that I'm converting to be Bootstrap responsive but have run into a couple of problems.
Mock up image
I'd be very grateful for any pointers
Upvotes: 0
Views: 1664
Reputation: 53
First, for the background image:
div.someclass{
background: url(images/bg.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
This will make your background image responsive, i.e. it will fit according to the size of the display the page is viewed on.
Second, to keep the main form content a proper margin from above on any device is to give the div you just created for the main content a relative margin on top:
div.someclass{
margin-top:5%;
}
change the above 5% according to your requirement.
Upvotes: 0
Reputation: 509
The following is one simple option, according to your mockup-Website.
There are a lot of StackOverflow topics the will help you through with the above steps.
HTH.
Upvotes: 2
Reputation: 191
To fix problem 1: on the body you can use: background-size:contain;
Upvotes: 0