Previous Message
Next Message

Two CSS Questions

Sent by Jeff Gates on 30 November 2004 20:08


I am floating a div to the right of a body of text. The div has an image
and, below the image, a text caption. 

Here is a sample of the code:

<div style="float: right; width: 350px; margin-top: 4px; margin-left: 7px;
margin-bottom 12px;">
<img src="http://mysite.com/images/great_divide.jpg" alt="The
Neighborhood's lawns reflect the outcome of the last week." width="350"
height="265" align="right" border="0" /></a><br />

<p class="preface" style="margin-top: 6px; margin-left: 3px;">The
neighborhood's lawns reflect the great divide between the Dead Leaf Browns
and the Dichondra Greens.</p>
</div>  


The main text of the story wraps around this div.

>From this I have two questions:

1. I just noticed that in IE 6 the caption (with the style of "preface") is
either missing from under the image or truncated. It's quite fine in
Mozilla, Firefox, IE Mac.

2. I remember being able to set the caption apart from the image (to create
a nice space between them) by using the margin-top attribute in the style of
the paragraph. But, for some reason it's no longer working in any browser.
(I'm adding an inline style because I use the preface class other places).
Is the margin-top not working because that can only be assigned to a block?
--if so is there a workaround to move it down from the image?)

Can anyone clue me in as to what mistakes I might be making in this code?
And if it's one of those dreaded IE issues, is there any workaround for
problem #1?

Thanks. 
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: