Forum Moderators: not2easy

Message Too Old, No Replies

Positioning Images using stylesheet

Have to use "&nbsp/<br>" to reserve space

         

gopherbroke

4:03 pm on Jan 4, 2006 (gmt 0)

10+ Year Member



I have created a separate style sheet and am trying to keep the html file free of style commands. I have resorted to using a series of "&nbsp" to "wallow out a hole" in a page where there is wrap-around text in order for the image to display horizontally. I seem to need a series of "<br>" to carve out vertical space for the image. I can't believe this is standard procedure. What am I doing wrong?

/* Style sheet */
div#photo {
background: url(../Images/photo.gif) no-repeat left;
color: #228B22;
float: left;
clear: left;
margin: 0px 10px 0px 0px;
}

Fotiman

4:21 pm on Jan 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Without seeing the entire context including the HTML, it's hard to tell what you're trying to do. However, my guess is that you want the entire background image to show. You could do this by explicitly setting the width and height of the div, or you might try setting the padding to match the width and height of the image.

gopherbroke

5:06 pm on Jan 4, 2006 (gmt 0)

10+ Year Member



Thank you fotiman... fresh eyes, new perspective and someone who knows what he's talking about make all the difference..