lpeek
06-21-2007, 01:51 PM
right.. so i kept being told that i need to use css instead of tables. everyone had perfectly valid reasons and i knew a little css already so i thought why not.
converted my whole site to css and now im having problems here there and everywhere. i never expected css to be so complicated.
the main problems im having is that i want all my content boxes 'divs' to basically... connect themselves to the previous divs.
but the problem is....
i can only position them using x and y co-ordinates... which isnt very usefull when you have a login box that gets longer in height when someone logs in... so the div below it then overlaps it...
i just dont understand what attributes i have to use when defining my divs to make them function correctly... ive searched so many websites and read so much about this but it just doesnt work.
here is the site:
www.jrevolution.net
and heres my defining code:
div#contentwrap
{
margin-left: auto;
margin-right: auto;
width: 900px;
}
div#header
{
position:absolute;
z-index:2;
left:50%;
margin-top:0px;
margin-left:-451px;
width: 900px;
height: 100px;
}
div#nav
{
width: 898px;
height: 24px;
position:absolute;
z-index:2;
left:50%;
margin-top:101px;
margin-left:-451px;
background-image:url(images/nav.gif);
background-repeat:repeat;
border:solid;
border-width:1px;
}
div#account
{
width: 148px;
float:left;
position:absolute; z-index:2; left:50%; top:0%;
margin-top:133px;
margin-left:-451px;
background-color:#CCCCCC;
border:solid;
border-width:1px;
}
div#leftlink
{
width: 148px;
float:left;
position:relative; z-index:2; left:50%; top:0%;
margin-top:auto;
margin-left:-450px;
background-color:#CCCCCC;
border:solid;
border-width:1px;
}
div#center
{
width: 586px;
float: left;
position:absolute; z-index:2; left:50%; top:0%;
margin-top:133px;
margin-left:-300px;
margin-right:auto;
background-color:#CCCCCC;
border:solid;
border-width:1px;
padding:5px;
}
div#rightad
{
width: 138px;
position:absolute; z-index:2; left:50%; top:0%;
margin-top:133px;
margin-left:299px;
padding:5px;
background-color:#CCCCCC;
border:solid;
border-width:1px;
}
div#footer
{
width: 586px;
height: 60px;
margin-left:0px;
margin-top:20px;
bottom:0px;
}
converted my whole site to css and now im having problems here there and everywhere. i never expected css to be so complicated.
the main problems im having is that i want all my content boxes 'divs' to basically... connect themselves to the previous divs.
but the problem is....
i can only position them using x and y co-ordinates... which isnt very usefull when you have a login box that gets longer in height when someone logs in... so the div below it then overlaps it...
i just dont understand what attributes i have to use when defining my divs to make them function correctly... ive searched so many websites and read so much about this but it just doesnt work.
here is the site:
www.jrevolution.net
and heres my defining code:
div#contentwrap
{
margin-left: auto;
margin-right: auto;
width: 900px;
}
div#header
{
position:absolute;
z-index:2;
left:50%;
margin-top:0px;
margin-left:-451px;
width: 900px;
height: 100px;
}
div#nav
{
width: 898px;
height: 24px;
position:absolute;
z-index:2;
left:50%;
margin-top:101px;
margin-left:-451px;
background-image:url(images/nav.gif);
background-repeat:repeat;
border:solid;
border-width:1px;
}
div#account
{
width: 148px;
float:left;
position:absolute; z-index:2; left:50%; top:0%;
margin-top:133px;
margin-left:-451px;
background-color:#CCCCCC;
border:solid;
border-width:1px;
}
div#leftlink
{
width: 148px;
float:left;
position:relative; z-index:2; left:50%; top:0%;
margin-top:auto;
margin-left:-450px;
background-color:#CCCCCC;
border:solid;
border-width:1px;
}
div#center
{
width: 586px;
float: left;
position:absolute; z-index:2; left:50%; top:0%;
margin-top:133px;
margin-left:-300px;
margin-right:auto;
background-color:#CCCCCC;
border:solid;
border-width:1px;
padding:5px;
}
div#rightad
{
width: 138px;
position:absolute; z-index:2; left:50%; top:0%;
margin-top:133px;
margin-left:299px;
padding:5px;
background-color:#CCCCCC;
border:solid;
border-width:1px;
}
div#footer
{
width: 586px;
height: 60px;
margin-left:0px;
margin-top:20px;
bottom:0px;
}