Ok, finally i decided to convert my page (the one in sig) to CSS. I started allright, and got most part of the basic layout. Now i met the problem i would never think i would in my life - HOW TO CENTER ??!?!//sorry for the lame question, but it really bothers me
So i made a simple test layout:
HTML Code:
<html><head>
<style>
#top {
width: 750px;
}
#leftside {
float: left;
width: 150px;
}
#rightside {
float: left;
width: 150px;
}
#leftcontent {
float: left;
width: 150px;
background: black;
border: blue solid 1px;
margin-top: 5px;
margin-bottom: 5px;
margin-right: 5px;
}
#rightcontent {
float: left;
width: 595px;
background: black;
border: blue solid 1px;
margin-top: 5px;
margin-bottom: 5px;
}
#frame {
width: 750px;
margin: auto;
}
</style>
</head>
<body bgcolor="#7F7F7F">
<div id="top">
<IMG src="http://timurkz.buildtolearn.net/banner.jpg" width=750 height=176 border="1" alt="">
</div>
<div id="leftside">
<div id="leftcontent"> <p style="color: white;">
left content<br>row 1
</div>
<div id="leftcontent"> <p style="color: white;">
left content<br>row 2
</div>
<div id="leftcontent"> <p style="color: white;">
left content<br>row 3
</div>
</div>
<div id="rightside">
<div id="rightcontent"> <p style="color: white;">
awdioawdioawnd<br>awdawd
</div>
</div>
</body>
</html>
And i want the whole content to be aligned in the center. I searched the net and found that many people have similar problems, but the solutions they got don't work for me. If i include the whole thing into another DIV the right content part gets moved down below the left part. About the "auto" method for the margins - i do need to save the margins on internal blocks at 5 pixels ( at least not 0 ). So there is probably a way to get over that "right below left" problem and include that whole thing into another div. I even tried putting it all in a table, but it turned out the same - righ below left.
Please help, and sorry again for stupid question
I know that it was discussed several times before, but the solution don't apply to my layout for some reason
|