Hi i am using this code to use a image in left side.


and my html is

<div class="get_a_quote"><a href="#"><img src="abc.jpg" /></a></div>

this is working proper in all browser but in IE6 and IE7 are creating problem.

4 answers

This was chosen as the best answer

1.) IE6 does not support position:fixed. You'd need to use a hack, such as this one: http://www.cssplay.co.uk/layouts/fixed.html.

2.) If I remember correctly, position:fixed does not work in IE7 if you are in quirks mode. Are you using a valid doctype?

3.) As Marko said, see if you can achieve what you're looking for without using position:fixed.

Answered about 8 years ago by Rob Flaherty
  • thanks rob!! gr8 KC Rajput about 8 years ago

Why are you using position: fixed? Can you post the entire code or a test link so we can preview it? You should probably just be using float: right and should remove the position: fixed; and right: 0; attributes.

Answered about 8 years ago by Marko Ivanovski
  • i want to fixed this div in right side fixed. KC Rajput about 8 years ago
Kau-Boy 110

Another problem beside the fact that IE6 doesn't support position: fixed is the imcompability with two positioning argument like bottom AND right. IE6 only supports one argument for a absolute positioned element.

There are some fixes around where you can position a DIV "fixed" by using position: absolute within IE6 but as soon as the content of your page moves (let's say because the user increaces the font size or he decreaces the width of the browser window) the element will stay at the scroll position it has been taking while loading the page.

So if you want to have a positioned element at the bottom, it won't work in IE6! But it does work in IE7. I also used a fixed footer in one of my projects and it works for IE7, but IE6 users will only see the footer when he scrolls to the end of the page.

I forgot to tell that as Rob said, you should really use a strict DOCTYPE for your document and you should not force the quirks mode as it makes it even harder to fix some IE6 issues.

Answered about 8 years ago by Kau-Boy

Hi i am using this code to use a image in left side.

I'm not sure I follow you want an image in the left side? from the code you have there the image goes to the right,

like other's said, you only need float right and clear the container float. If you need further help, you can post your entire code at jsbin so that we can preview and help you

Answered about 8 years ago by cssrockstah