2 replies [Last post]
gmoniey
Offline
Regular
Last seen: 12 years 35 weeks ago
Joined: 2007-11-05
Posts: 25
Points: 0

Hi,

I am having some trouble floating an image to the left and wrapping the text around it. The text actually wraps fine, but i am trying to give a bit of a margin/padding to the left of the image. I have tried several different margin/padding parameters and nothing seems to be working.

the code I used is:
img.floatRight {
float: right;
clear: left;
margin-left: 10px;
width: 150px;
height: 175px;
}

You can see an example at http://test.lambandtunafish.com and the css file is at http://test.lambandtunafish.com/style.css

any help is greatly appreciated. thanks!

syrupcore
Offline
Enthusiast
Last seen: 11 years 37 weeks ago
Timezone: GMT-8
Joined: 2004-03-10
Posts: 108
Points: 0

the declaration for #primary

the declaration for #primary .entry-content img is winning the cascade battle. it has margin:0; set. you'll need to add more weight to your img.floatRight selector. perhaps

#page #primary img.floatRight {your stuff: here}

will

gmoniey
Offline
Regular
Last seen: 12 years 35 weeks ago
Joined: 2007-11-05
Posts: 25
Points: 0

turns out you were

turns out you were right...thanks for your help...

I kept getting confused because the floatRight css was being used (atleast for the images width/height) so I couldn't figure out why it wouldn't go with the margin values I was using.

thanks again!