...

View Full Version : Help with Div alignment



rastacssforum
02-13-2011, 02:07 AM
Hey all, this is probably easy one. I'm just having some problems setting up my div tags. I cant seem to figure out why they are coming out like this:


http://www.rossow-web.com/ryan/index.html


This is how it was designed:

http://www.rossow-web.com/ryan/Mock_vs1.jpg

could someone look at the code and tell me what i'm doing wrong?

Excavator
02-13-2011, 02:17 AM
Hello rastacssforum,
Try making your CSS look like this -

#container2 {
/*height: 300px;*/
width: 860px;
margin: 0 auto;
}
#footercontainer {
background-image: url(../images/footerbck.jpg) ;
height: 166px;
width: 870px;
margin: 0 auto;
}

rastacssforum
02-13-2011, 02:46 AM
yea unfortunately that didnt work....i changed the css code and this is what i got...


http://www.rossow-web.com/ryan/index.html


how do i bring the middle container down to match this http://www.rossow-web.com/ryan/Mock_vs1.jpg....

without moving the background image....

eberdome
02-13-2011, 03:32 AM
try adding position:relative; and top:200px; to container 2


adjust 200px till its down far enough

rastacssforum
02-13-2011, 03:35 AM
Does anyone have any advise on this issue?

Excavator
02-13-2011, 03:38 AM
Oop, I was not looking at your bg image... sorry.
Try this instead -


#container {
display:block;
background:url(../images/index_header.jpg) no-repeat 0 0;
width: 948px;
margin: 0 auto;
overflow: auto;
}


#container2 {
width: 860px;
/* height: 300px;*/
margin: 230px auto 0;
}


You also have some markup errors (http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.rossow-web.com%2Fryan%2Findex.html) that need to be fixed.

rastacssforum
02-13-2011, 03:57 AM
Hey you guys are awesome! thank you both....

eberdome's solution worked, but i will try Excavator's solution too.


....:thumbsup:



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum