I’m new to web-design and I’ve been trying to practice by making a mock-up coffee website design. So far I’m only trying to get the layout set up so that it’ll be much easier to put the pictures and information in later (hopefully).
I’ve run into, what I think are margin problems.
When I make the browser window bigger, the (2 and 3) sections of the layout don’t stay consistent, but if I make it smaller to the perfect dimensions, it fixes and looks like how I want it to. I don’t know what the problem would even be called, so my google attempts have been useless.
No matter what size the browser window.
Here’s the code:
<html>
<head>
<style type="text/css">
body {
background-color: #
background-image: url('images/background.png');
background-repeat: no-repeat;
background-position:center;
}
div.container {
width: 100%;
margin:0px;
border: 1px solid red;
}
div.header {
width: 679px;
height: 241px;
margin: auto;
background-color: grey;
bbackground-image: url('images/images/beancafe_01.gif');
background-position: center;
background-repeat: no-repeat;
clear:left;
text-align: center;
}
div.footer {
width: 679px;
height: 52px;
margin: auto;
background-color: grey;
bbackground-image: url('images/images/beancafe_06.gif');
background-position: center;
background-repeat: no-repeat;
clear:left;
text-align: center;
}
div.two {
float:left;
width:340px;
height: 322px;
margin-left: 370;
background-color: pink;
bbackground-image: url('images/images/beancafe_02.gif');
background-attachment:fixed;
background-repeat: no-repeat;
text-align: center;
color: black;
}
div.three {
width:339px;
height: 322px;
margin-left: 710;
background-color: green;
bbackground-image: url('images/images/beancafe_03.gif');
background-attachment:fixed;
background-repeat: no-repeat;
text-align: center;
}
div.four {
width:679px;
height: 291px;
margin: auto;
background-color: orange;
bbackground-image: url('images/images/beancafe_04.gif');
background-position: center;
background-repeat: no-repeat;
text-align: center;
}
</style>
</head>
<body>
<div class = "header">1</div>
<div class = "two">2</div>
<div class = "three">3</div>
<div class = "four">4</div>
<div class = "footer">5</div>
</body>
</html>
Thanks, much appreciated.