tags:

views:

39

answers:

3

In IE 7 background shift to 1 px top to but in FF it's ok?

 background: url(girl.jpg) top left repeat-x;
 position: relative;
 top: 0px;color: #666;
 border-bottom-color: white;
+1  A: 

I don't think this comes from the background image. Are you sure there is no transparent border, or other 1px shift elsewhere in the markup?

Pekka
yes `border-bottom-color: white;`
metal-gear-solid
@metal but that couldn't cause a shift in the *top*, could it?
Pekka
A: 

IE6 has bugs with positioning background on relative positioned elements. Is your document in standards mode? And try giving your element hasLayout e.g. with zoom: 1.

RoToRa
yes `zoom:1` solve the background problem but it breaks the layoyt
metal-gear-solid
You'll need to rework the layout then, so that it works with hasLayout :-(
RoToRa
A: 

you can use this

      top:0px;
    *top:1px;

*background-position:0px 1px;
  • work only four IE7 so you can use this.

you can enter value according your design. in *top: px.

kc rajput
no it's not working
metal-gear-solid
@metal can you show some more code please? The HTML?
Pekka
have you add this code in your css. you can set top value like *top:-1px. try it. or have you try this
kc rajput
`*top:-1px` i think it's can't control background position
metal-gear-solid
*background-position:0px 1px;use this.
kc rajput
@kc - it worked thanks. edit your answer
metal-gear-solid