...

View Full Version : Resolved Position Problem "IE" Vs "Firefox"



blackwolf
11-17-2008, 06:32 PM
I have THIS PAGE (http://www.blackwolf-graphics.co.uk/index2.html) and at the top of this page in the right corner should be an image which is positioned with CSS. In IE, it is fine. But when I check with Firefox, its positioned on the left side instead of the right.

Here is the CSS I used...
.ad {position:absolute; top:5px; left:780px }

and the codeing on my page is...
<div class="ad"><a href="advertise.html" target="_blank" ><img src="images/advertisewithus.gif" alt="Click Here to advertise with us" width="200" height="100" border="0"/></a></div>

How can I make it do what I want in Firefox?

drhowarddrfine
11-17-2008, 08:31 PM
Write valid markup. You have 149 html errors. I couldn't check how many CSS errors you have.

drhowarddrfine
11-17-2008, 08:37 PM
In fact, you position '.ad' on the left side yet IE is putting it on the right but you are trying to correct Firefox?

Never, ever use IE as a reference for what is working. Follow Firefox and it will show what you wrote. With IE, you never know.

blackwolf
11-18-2008, 12:28 PM
149!! Where are the errors?
I have positioned it 780px from the left so it appears where i want it, on the right. How can I get it to appear on the right in both browsers?

abduraooft
11-18-2008, 01:11 PM
149!! Where are the errors?
I have positioned it 780px from the left so it appears where i want it, on the right. How can I get it to appear on the right in both browsers? See http://validator.w3.org/check?uri=http%3A%2F%2Fwww.blackwolf-graphics.co.uk%2Findex2.html&charset=%28detect+automatically%29&doctype=Inline&group=0

blackwolf
11-18-2008, 06:13 PM
Those errors dont bother me, almost every web page I tried had errors, even this website has errors. So, how do I get the image to be positioned on the right instead of the left?

drhowarddrfine
11-18-2008, 07:52 PM
Why we won't help you. (http://diveintomark.org/archives/2003/05/05/why_we_wont_help_you)

Doctor_Varney
11-18-2008, 10:33 PM
So, how do I get the image to be positioned on the right instead of the left?

.ad { float:right; margin-top:5px; margin-right:5px } in your CSS.

Floating right throws stuff directly to the right. Floating stuff left, throws it left. The margins will nudge it back, left a little, into position for you. That's the basic principle, anyway. In all browsers...

Validation is also very important, but without a proper grounding, I would say most of what you produce in this mannner, will be teeming full of errors anyway. Validation will help you write proper syntax, but it can't tell you to dump frames, use divs, or suggest methods of design. Only a human being can tell you these things.

The code I've offered up won't help you deal with the other errors - but I think, get a feel for the principle of floating things left and right, rather than all that absolute positioning. Combined with margins and padding, you'll soon be looking at a more intuitive system for reliable positioning.

Then when you've done something you're happy with, keep running it by the validator, to check your progress. That will indeed assist you in writing the code correctly.

I'm sure others will be able to assist you with some reference material, regarding floating and positioning elements.

I doubt this will help greatly, but I hope it puts you in the right direction.

Edit:
Looks like you've used float before. Surprised you hadn't tried it already.

Regards,
http://i183.photobucket.com/albums/x103/Doctor_Varney/signature.gif

blackwolf
11-19-2008, 01:15 PM
Thans Doctor Varney. I had put the page through the validator and and ammended the code as I should have done. Your floating method seems to work great. Thanks.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum