I am trying to float a picture left in the snippet below (a table cell). There is no CSS applied other than that shown below – I have tried everything I can think of, to no avail. I am displaying the page in FF.
<tr>
<td>
<div>
<div style="width:60%; float left;">
<div>
<div><h4 style="margin:0px 0px;">Hello</h4> <strong>World!</strong></div>
<div>Line 1</div>
<div>Line 2</div>
<div>Line 3</div>
</div>
<div>
<div>Line 4</div>
<div>Line 5</div>
</div>
<!-- no effect, so commented out
<div style="clear:both; height: 1px;"></div> -->
</div>
<!-- I want this next div floated right as instructed in the CSS - but it has no effect! :/ -->
<div style="width:35%; float right;">
<a href="<?php echo $row['page_link']; ?>"><img src="<?php echo $row['photo_link']; ?>" /></a>
</div>
<!-- no effect, so commented out
<div style="clear:both; height: 1px;"></div> -->
</div>
</td>
</tr>
What am I doing wrong?!
Without the
:, you’ve just got a CSS syntax error and the style rule is ignored.