dazz_club Posted August 11, 2006 Share Posted August 11, 2006 Hi Guys,I would like to align these square boxes to eachother on the same line, but i dont know what position to use or the ones i have used dont work?At present one is on top of the other and i would like them to be side by side next to eachother.any pointers?heres the code below if it helps <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><title>test css sheet</title><style type="text/css"><!--#box {height:100px;width: 100px;border: 1px solid #FFF;background-color:#FFFF00;}#box2 {height:100px;width: 100px;border: 1px solid #FFF;background-color:#CCC;right: auto;}--></style></head><body><div id="box"></div><div id="box2"></div>test</body></html> Link to comment Share on other sites More sharing options...
vchris Posted August 11, 2006 Share Posted August 11, 2006 You could have your first box floated left and then your box2 have a margin left of a bit more than the size of your box1. Link to comment Share on other sites More sharing options...
Chandra.Vedantham@gmail.com Posted August 11, 2006 Share Posted August 11, 2006 As an aliter you can use a table and place your boxes in adjacent table cells. Link to comment Share on other sites More sharing options...
dazz_club Posted August 11, 2006 Author Share Posted August 11, 2006 Cheers guys, i gonna go with vchris`s suggestion instead.cheers, very much appreciated. Link to comment Share on other sites More sharing options...
vchris Posted August 11, 2006 Share Posted August 11, 2006 My pleisure Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now