i understand that this question came maybe million times
but i assure you all that i googled like idiot
compared my code with others and i dont have luck at all...
i started to learn about div layers because i wanted to throw away tabled layout...
so my problem is:
i have 3 DIV's, 1st is main that contain other 2
2nd is on the left side with content
3rd is on right side of 2nd
---
i just want that those div layers all be centered on any resolution
bigger than 1024x768
i made pictures of what i want if i sound stupid :P
- orange is main layer containing other 2
- blue & green are other 2
my wish:
---------------
this is my humble code, i tried to put some logic in it but no luck...
Code:
<style type="text/css">
body {
background-color: #CCCCCC;
margin-left: 0px;
margin-top: 0px;
}
.main_frame {
position: absolute;
top: 0px;
left: 0px;
width:100%;
}
</style>
Code:
<div class="main_frame">
<div style="position: absolute; top: 7px; left: 7px; width: 270px;">
<p>some text/link</p>
<p>another text/link</p>
<p>yet another text/link</p>
</div>
<div style="position: absolute; top: 7px; left: 280px; width: 600px;">
<p>some text/link</p>
<p>another text/link</p>
<p>yet another text/link</p>
</div>
</div>
some site recommended to put in body: text-align: center;
and for rest layers: text-align: left;
this didnt work
some site recommended to put layer(s) 50% from left
but this would only "push" my content far on right and align still would
not be centered...
then i tried on stupid way:
make table with 1 row, set its align to centered and put all div's inside
but then i had trouble with positioning left and right layers where i wanted
(since everything inside table is i guess under tabular rules and is placed in center of table...)
any help would be apreciated