Postioning Issues
Posted: 26 July 2006 04:10 PM   [ Ignore ]
Newbie
Rank
Total Posts:  8
Joined  2006-07-24

Hi,
I am using DIV tags in my html document.
The one on the left—- DIV 1 has width = 12% so if I want the right one to span the entire width it should be—- DIV 2 width = 88%. This is not working in my page.
How do I get it to work right ?
Thanks

Profile
 
 
Posted: 28 July 2006 07:03 AM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  19
Joined  2006-05-22

KESHAVi PATEL,

Generally, you cannot span 100% else you’ll run into trouble especially if you associate horizontal padding or margins in your divs. .... then borders, if used, eat up horizontal dimension.

DIV 1{
float: left;
width: 12%;
margin: 0;
padding: 0;
}
DIV 2{
float: right;  (or you can float left, as well with margin-left 13% or better)
width: 84%;
margin: 0;
padding: 0;
}

This gives you 4% in between the divs and renders well in both MSIE & mozilla.
You’ll have to play aeound with it a bit to get it exactly where you need it.


later,
Al Toman

Profile
 
 
Posted: 28 July 2006 12:36 PM   [ Ignore ]   [ # 2 ]
Newbie
Rank
Total Posts:  8
Joined  2006-07-24

Thanks
Al Toman !

Profile