niche Posted June 14, 2011 Share Posted June 14, 2011 What's keeps 2nd div from floating against 1st div? <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"><html><head><meta http-equiv="content-type" content="text/html;charset=UTF-8" /><style type="text/css">div.up6_leftTop{width:298px;height:237px;margin:0px 0px 0px 0px;padding:0px;border:4px solid gray;border-style:dashed none none dashed;}</style></head><body><?php echo '<div class="up6_leftTop">'; echo '</div>'; echo '<div style="float:left;width:220px;height:200px;">'; echo '<form action="adj_width.php" method="post">'; //echo '<input name="' . $var . '" type="text" />'; echo '<input name="adj_width" type="text" />'; echo '<input type="submit" value="Submit" />'; echo '</form>'; echo '</div>'; ?> </body></html> Link to comment Share on other sites More sharing options...
Ingolme Posted June 14, 2011 Share Posted June 14, 2011 The float property will make an element float to the left or right of all the elements that follow it, not the ones before it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.