having problems as mentioned in the title, I know the standard solution is margin 0 auto but this isn't working. My thinking is because its two divs and that's making it freak out? I had a similar issue before and solved it using display: block-inline; but the current situation appears to be different.
I'll skip the HTML code as the divs are correctly nested inside the large container. Container is the container surprisingly and the four #block_ things are whats inside it. I basically want 1 large block beside one small block and the same below, this is currently fine but the alignment on the page is not centered, they're just obeying the temporary margins I have set on them. Here's the CSS:
*Current thought is to use another container the same width as my header, then just float left for the large blocks, float right for the small blocks?
I'll skip the HTML code as the divs are correctly nested inside the large container. Container is the container surprisingly and the four #block_ things are whats inside it. I basically want 1 large block beside one small block and the same below, this is currently fine but the alignment on the page is not centered, they're just obeying the temporary margins I have set on them. Here's the CSS:
Code:
body {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-size: 12px;
color: #838383;
margin: 0px;
padding: 0px;
/*background-color: #156894;*/
background: url(../Images/black_background_03.png);
background-repeat: repeat;
width:100%;
}
h4 {
color: #00aeef;
font-weight:bold;
font-size:12px;
margin: 0px;
padding: 4px 0px 0px 10px;
}
h5 {
color: #b6b6b6;
font-weight:bold;
font-size:10px;
margin: 0px;
padding: 0px 0px 0px 10px;
}
#container {
width:950px;
margin:0 auto;
border:1px solid red;
overflow:auto;
}
#header {
width:769px;
padding-top:20px;
margin:0 auto;
}
#footer {
background-image: url(../Images/footer3.png);
background-repeat: repeat;
margin:auto;
height:140px;
}
#footer_nav {
float:right;
padding-right:475px;
}
#footer_container {
text-align:center;
padding: 50px;
}
#block_toptunes {
float: left;
width: 250px;
margin-top: 20px;
margin-left: 10px;
}
#block_shoutouts {
float: left;
width: 250px;
margin-top: 20px;
margin-left: 10px;
}
#block_content {
float: left;
width: 500px;
margin-top: 20px;
margin-left: 10px;
text-align:justify;
}
#block_feature {
float: left;
width: 500px;
margin-top: 20px;
margin-left: 10px;
}
.big-content-top {
float: left;
height: 40px;
width: 485px;
background: url(../Images/big_content_top.png) no-repeat;
padding: 0px 15px ;
}
.big-content-middle {
float: left;
width: 500px;
background: url(../Images/big_content_middle.png) repeat-y;
padding: 5px 15px 0 15px;
}
.big-content-bottom {
float: left;
height: 13px;
width: 500px;
margin-bottom: 15px;
background: url(../Images/big_content_bottom.png) no-repeat;
}
.small-content-top {
float: left;
height: 40px;
width: 235px;
background: url(../Images/small_content_top.png) no-repeat;
padding:0px 15px ;
}
.small-content-middle {
/* float: left;
width: 217.5px;
padding: 5px 15px 0 15px;
border-right: 1px solid #272727;
border-left: 1px solid #272727;
background: #000;*/
float: left;
width: 250px;
background: url(../Images/small_content_middle.png) repeat-y;
padding: 5px 15px 0 15px;
}
.small-content-bottom {
float: left;
height: 10px;
width: 250px;
margin-bottom: 15px;
background: url(../Images/small_content_bottom.png) no-repeat;
}
form{
padding-top:5px;
overflow:auto;
margin:0 auto;
width:244px;
}
input[type=text], textarea {
width:212px;
background:#080808;
color: #838383;
font-size:14px;
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
outline:none;
border:1px solid #292929;
}
input[type=text]:hover, textarea:hover, input:focus, textarea:focus {
background: #eeecec;
outline:none;
}
input[type=submit] {
cursor:pointer;
}
.bluetext {
color: #00aeef;
}
.whitetext {
color: #ffffff;
}
*Current thought is to use another container the same width as my header, then just float left for the large blocks, float right for the small blocks?