aligning bg images in css - opera and ie issue

Discussion in 'HTML' started by badstyle, Dec 14, 2003.

  1. badstyle

    badstyle Guest

    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..
     
    badstyle, Dec 14, 2003
    #1
    1. Advertising

  2. badstyle

    brucie Guest

    in post <news:brioh1$42v$>
    badstyle said:

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


    URL?


    --
    brucie
    15/December/2003 08:42:52 am kilo
     
    brucie, Dec 14, 2003
    #2
    1. Advertising

  3. badstyle

    badstyle Guest

    "brucie" <> wrote in message
    news:brip34$3rcpa$-berlin.de...
    > in post <news:brioh1$42v$>
    > badstyle said:
    >
    > > i seem to have stumbled across a bit of a strange issue regardling the
    > > positioning of BG images via CSS.

    >
    > URL?
    >


    sorry yeah!

    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

    cheers


    ...b..
     
    badstyle, Dec 15, 2003
    #3
  4. badstyle

    Eric Bohlman Guest

    "badstyle" <> wrote in news:brkuv8$5fm$:

    > 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.
     
    Eric Bohlman, Dec 15, 2003
    #4
  5. badstyle

    badstyle Guest

    "badstyle" <> wrote in message
    news:brioh1$42v$...
    > 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..
     
    badstyle, Dec 18, 2003
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.frontiernet.net
    Replies:
    6
    Views:
    1,125
    news.frontiernet.net
    Apr 16, 2004
  2. Bob
    Replies:
    24
    Views:
    1,546
  3. UKuser

    Images and aligning

    UKuser, Apr 12, 2007, in forum: HTML
    Replies:
    1
    Views:
    325
  4. Marc Bradshaw
    Replies:
    18
    Views:
    783
    Marc Bradshaw
    Sep 17, 2008
  5. tshad

    images and text not aligning

    tshad, Sep 16, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    387
    bruce barker
    Sep 16, 2008
Loading...

Share This Page