I am trying to do some step by step (4 steps in total) checkout. I thought about having a kind of a horizontal slider setup.
I created a container with a width of 400% containing 4 containers. These containers should be side by side and fill 100% of the Window. This is kind of a horizontal slider but i want to use it as a form.
[[[Container 1][Container 2][Container 3][Container 4]]]
My html:
<div class="container fullWidth">
<div id="checkoutContainer">
<div class="checkout" id="cart">Cart</div>
<div class="checkout" id="contact">Contact</div>
<div class="checkout" id="address">Addresse</div>
<div class="checkout" id="overview">Übersicht</div>
<div class="checkout" id="thankyou">Danke</div>
</div>
</div>
My CSS:
.container.fullWidth {
width : 100%;
overflow-x: hidden;
}
div#checkoutContainer {
background-image: url(../img/background.jpg);
background-repeat : repeat-x;
width : 500%;
height : 657px;
}
div#checkoutContainer div.checkout {
float : left;
width : 900px;
height : 657px;
}
The question is now: Can i somehow make the single divs fill the width of the page without using javascript (I know i can detect the page width and set the width)? Setting div.checkout { width : 100% }
does not work as they will stack on each other then.