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 Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.