jaymc Posted August 17, 2007 Share Posted August 17, 2007 How do I apply a width to a div in firefox I have the following code working fine in IE, but not in firefox <div align=center style="display:inline; width:50%;">No Comments</div> <div align=center style="display:inline; width:50%;"><img src=galcoms.gif style="border-style:none;"></div> Im tryig to make the divs act as 2 TDs, so content next to each other but spaced out on the one line Any ideas Link to comment https://forums.phpfreaks.com/topic/65491-solved-div-width/ Share on other sites More sharing options...
wildteen88 Posted August 17, 2007 Share Posted August 17, 2007 use floats instead: <div align=center style="float:left; width:50%;">No Comments</div> <div align=center style="float:left; width:50%;"><img src="galcoms.gif" style="border-style:none;"></div> Note after those two divs you'll need to clear the float, by adding clear:both to an element after those two divs. Link to comment https://forums.phpfreaks.com/topic/65491-solved-div-width/#findComment-327035 Share on other sites More sharing options...
jaymc Posted August 17, 2007 Author Share Posted August 17, 2007 Isnt there a float:center Im trying to use it with 3 divs, but sometimes the first div has no content in it as the content is provided dynamically If I have 3 divs in a row using float and there is no content in div1 then div2 appears over to the left Link to comment https://forums.phpfreaks.com/topic/65491-solved-div-width/#findComment-327084 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.