Forum Moderators: not2easy

Message Too Old, No Replies

Right align a photograph

right align photograph

         

Martinb

11:59 pm on Feb 10, 2009 (gmt 0)

10+ Year Member



I am trying to right align a photograph and put some decorative text (a quote) to the left of it. When i do this as i thought it should be, the photograph appears on the left, and the text is underneath it.

My HTML:

<p class="quote">
<img class="rightalign" src="images/flower2.jpg" width="305" height="394" alt="Photo of a yellow hibiscus flower." />
With each new sunrise, comes innumerable opportunities for growth and change. Oh
the Possibilities! </p>

The CSS:

p.quote
{font-size: 18pt;
font: bold italic 2em/1em Verdana,Arial,Helvetica,san-serif;
margin: 0;
padding: 0;
border-top: solid #e7ce00 medium;
border-bottom: solid #e7ce00 thin;
width: 600px;
color: #e7ce00

IMG.rightalign {
float:right; margin: 0 0 15px 15px; border: 2px solid #000000;}

Any help greatly appreciated.

webfoo

12:07 am on Feb 11, 2009 (gmt 0)

10+ Year Member



Try putting the image outside of the <p>.

sneakyhybrid

6:08 am on Feb 11, 2009 (gmt 0)

10+ Year Member



missing end bracket } on your p.quote class