Jump to content


Photo

Box Position Is Relative


Best Answer catrina , 04 December 2012 - 08:35 PM

You can try changing the position attribute of one of the boxes by using absolute: http://www.w3schools...ss_position.asp

Go to the full post


  • Please log in to reply
2 replies to this topic

#1 frygurl

frygurl

    Member

  • Members
  • 25 posts
  • Country: Country Flag

Posted 04 December 2012 - 07:43 PM

I can't seem to figure this problem out. I am creating the layout for a website I've designed using boxes. I am using CSS margins to position the boxes on the page. The problem is, the positions seem relative to each other. If one moves, it moves another as well.

 

Here's an example of the CSS I'm using:

 

#fbox_96{
margin-top:-15px;
margin-left:30px;
width: 220px;
height: 50px;

}

 

#fbox_103{
margin-top:-35px;
margin-left: -10px;
width: 720px;
height: 50px;

 

So, let's say I change the margin-top for fbox_96. The margin also changes for fbox_103. Any suggestions for a better way to do this? The website is here: http://www.msbeautyp...om/wp.php/home/

 

Thanks!



#2 catrina

catrina

    Advocate

  • Members
  • 12345 posts
  • LocationCalifornia
  • Country: Country Flag

Posted 04 December 2012 - 08:35 PM   Best Answer

You can try changing the position attribute of one of the boxes by using absolute: http://www.w3schools...ss_position.asp



#3 frygurl

frygurl

    Member

  • Members
  • 25 posts
  • Country: Country Flag

Posted 04 December 2012 - 09:01 PM

Thanks, that's the thing I needed!!