aligning bg images in css - opera and ie issue

B

badstyle

i seem to have stumbled across a bit of a strange issue regardling the
positioning of BG images via CSS.

i was wandering if this was a known issue or if there are things that i can
do in order to rectify this seemingly incompatability of CSS without using
javascript or Server Side Scripting.

in this case i have a table cell with one or the other of the css below
attached to it. i want to position the BG image - which repeats - to the top
left of the table cell [background-position: 0px 0px;]. But strangely i have
to alter the vertical position by 4px for the image to visibly tile
correctly in Opera. The table cell's height is specified to be exactly the
same height has the image used for tiling.

for your reference:

---works well in OPERA 7 - but not in IE 6---

..tableT {
background-attachment: fixed;
background-image: url(../images/construction/table_T.gif);
background-repeat: repeat;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
text-transform: uppercase;
font-weight: bold;
background-position: 0px 4px;
}


---works well in IE 6 - but not in Opera 7---

..tableT {
background-attachment: fixed;
background-image: url(../images/construction/table_T.gif);
background-repeat: repeat;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
text-transform: uppercase;
font-weight: bold;
background-position: 0px 0px;
}


...b..
 
E

Eric Bohlman

badstyle said:
http://www.btinternet.com/~badstyle/default-table.htm

this is the version that works fine in IE6 but has to be adjusted to work
well in Opera 7

It doesn't render correctly in IE6 either if you engage standards mode, nor
does it render correctly in Mozilla. And the problems persist if you
comment out the links to the stylesheets. I suspect the problem is with
the nonstandard "height" attribute on the tables themselves.
 
B

badstyle

badstyle said:
i seem to have stumbled across a bit of a strange issue regardling the
positioning of BG images via CSS.

i was wandering if this was a known issue or if there are things that i can
do in order to rectify this seemingly incompatability of CSS without using
javascript or Server Side Scripting.

in this case i have a table cell with one or the other of the css below
attached to it. i want to position the BG image - which repeats - to the top
left of the table cell [background-position: 0px 0px;]. But strangely i have
to alter the vertical position by 4px for the image to visibly tile
correctly in Opera. The table cell's height is specified to be exactly the
same height has the image used for tiling.

for your reference:

---works well in OPERA 7 - but not in IE 6---

.tableT {
background-attachment: fixed;
background-image: url(../images/construction/table_T.gif);
background-repeat: repeat;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
text-transform: uppercase;
font-weight: bold;
background-position: 0px 4px;
}


---works well in IE 6 - but not in Opera 7---

.tableT {
background-attachment: fixed;
background-image: url(../images/construction/table_T.gif);
background-repeat: repeat;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
text-transform: uppercase;
font-weight: bold;
background-position: 0px 0px;
}


..b..

i've found that if i set the 'background-attachment:' as 'scroll' instead of
'fixed' it seems to eradicate this problem. At least this appears to be true
in my version of IE6, OPERA 7 and NN 7.1

thanks to all those who posted!


...b..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,835
Latest member
KetoRushACVBuy

Latest Threads

Top