It's not working. I understand you use a "." for classes and a "#" for ID's, and I understand why I should use a class instead of an ID for this, but I'm not always sure when to use a div or not and how to do the CSS selector part properly. Can I name it whatever I want (such as floatright so I know later what it's for) or are there only certain things I can use? I would appreciate any kind souls who can help me out.

Rayzur
—
2011-06-30T00:18:19Z —
#2

It's not working. I understand you use a "." for classes and a "#" for ID's,Hi,Yes that is correct about the classes and I don't see any errors in your css.

I took your test code and used one of my own images and it is working fine for me.

Your image url does not have an extension on it, try correcting that and it should work.In fact when I ran your code the alt text flashed up very briefly then disappeared.

Mittineague
—
2011-06-30T00:30:08Z —
#3

Sorry for the not-so-helpful tangential reply.

I wouldn't name it "floatright" but something like "affwrapper" or somesuch.

It will always be for the aff link, but what happens if you later decide it should "floatleft" ?

.floatright {float: left;margin-right: 10px;}

i.e. What it is not what it does

laburke
—
2011-06-30T01:35:16Z —
#4

Thank you both! I will try again.

Mittineague said:

I wouldn't name it "floatright" but something like "affwrapper" or somesuch.

It will always be for the aff link, but what happens if you later decide it should "floatleft" ?

i.e. What it is not what it does

I was going to make different classes, one for floating left and one for right but I see your point in making it describe itself better.

And be sure to look at in IE7 ( especially if the text output width is less than image width, which in your case, it isn't...just saying)

Rayzur
—
2011-07-05T03:18:40Z —
#7

Hi Laura,

The problem is that .custom class you have placed on the <body>

Look at all the other selectors on that custom.css, they are working because you have included the .custom class

This should get it working for you -

[B].custom .affwrapper[/B] {
float: right;
margin-left: 10px;
}

edmondk7
—
2011-07-05T03:39:56Z —
#8

have you tried

text-align:right;

Its hard to tell whats around your div and if this div is a child of another div?

laburke
—
2011-07-05T03:42:18Z —
#9

Thank you both. I tried both suggestions, and based on datadriven's code, I simply added

align="right"

in the img src in the HTML. But if I left that part off it didn't work. What I don't get is why do you have to put it in there if the "affwrapper" class is already telling it to align right?

Edited: Thanks, edmondk7 as well for your suggestion.

Rayzur
—
2011-07-05T03:43:51Z —
#10

see post#7 above

laburke
—
2011-07-05T03:45:11Z —
#11

Rayzur said:

see post#7 above

Yes, but that didn't work for some reason. I tried that first. ??

Rayzur
—
2011-07-05T03:50:20Z —
#12

^ Go ahead and make the change to your css and re-upload it.Then do a hard clear on your browser cache. (shift+reload)

Of course you would need to remove the align="right" from the image to see that the float will workI had already done a live edit with it previously

laburke
—
2011-07-05T03:54:42Z —
#13

Nope, it still popped back over to the left. It is there now. I must be missing something obvious, sorry!

Rayzur
—
2011-07-05T04:05:04Z —
#14

It may be that #container ID giving more weight to it.

Try

container .affwrapper { float: right}

laburke
—
2011-07-05T04:09:30Z —
#15

Still no luck. I am interested in finding out why this is the case, but I have to hit the hay for the night. Even though I can now solve the problem using align="right" in the HTML, I want to understand the concepts behind this so I can add to my slowly growing knowledge of CSS. If you have any further ideas, that would be great - but I very much appreciate your help so far!

Rayzur
—
2011-07-05T04:13:14Z —
#16

I can now solve the problem using align="right" in the HTML

That's deprecated in the strict doctype your using

Leave it as it is for now and let me look at it some more.

The last suggestion worked for me in a live edit too so there must be something else going on here

Rayzur
—
2011-07-05T04:30:13Z —
#17

You did not close your .custom #header properly and all rules that follow are being ignored.