www.webdeveloper.com
Results 1 to 7 of 7

Thread: fixed background in table ?

  1. #1
    Join Date
    Feb 2004
    Posts
    70

    fixed background in table ?

    is it possible?

    i tried it but it doesn't work

    Code:
    .LEVEL1_TABLE {
          background:url(background.gif) #FFFFFF bottom right no-repeat fixed;
          vertical-align: top;
          border-style: normal;
          font-size: 10pt;
          font-family: Arial;
          cellpadding: 0
    }
    Thank you

  2. #2
    Join Date
    Aug 2003
    Posts
    1,576
    could we get the full source or a link? Its hard to tell the problem with this little code.

  3. #3
    Join Date
    Feb 2004
    Posts
    70
    which one? CSS? HTML?

    CSS
    Code:
    .LEVEL1_TABLE {
          background:url(background.gif) #FFFFFF bottom right no-repeat fixed;
          vertical-align: top;
          border-style: normal;
          font-size: 10pt;
          font-family: Arial;
          cellpadding: 0
    }
    HTML

    Code:
    <html>
    
    <head>
    <title>test01</title>
    </head>
    
    <body>
    
    
    <div align="left">
    
    <table class="main_table" border="0" cellpadding="0" cellspacing="0" width="896" bgcolor="#FFFFFF">
        <tr>
            <td width="183">&nbsp;</td>
            <td width="710">
    
    <table border="0" cellpadding="0" cellspacing="0"> 
        <tr>
            <td align="center" valign="top">
            menu 
    	</td>
            <td valign="top" width="10">
            content
    	</td>
            <td align="right" valign="top">
    
    	</td>
        </tr>
    </table>
    
            </td>
        </tr>
    </table>
    </div>
    
    </body>
    </html>
    thank you

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    css: .LEVEL1_TABLE
    html:main_table
    You have no LEVEL1_TABLE class in the html.

  5. #5
    Join Date
    Feb 2004
    Posts
    70
    yeah i know... i was mistake typing main_table instead of level1_table. that html and css are just example.

    i found out that IE doesn't support fixed background on table but FF does. one problem is ff.... please check it at my site... with FF.. you will see NL is center of end of the table... i want it at bottom right of the table... not bottom center of the table. can i fix it?

    thank you.

  6. #6
    Join Date
    Apr 2004
    Posts
    32
    I just ran into a problem last week with trying to use a fixed background within a div.

    It looked great under IE, but was broken under Mozilla and Netscape.

    When you change a background-attachment to fixed, it attaches it to the object under IE, but attaches it to the document for all other browsers it seems. Even IE for Mac attaches it to the document and not the object.

    It makes more sense to attach it to the object as all you have to do is attach it to the body if you really wanted it there.

    If you try to move the background to the center of your object, it moves out of alignment under IE.

    The solution I found was to create a div and set it to the exact measurements of the background but not to set it as fixed. Then create a child element with overflow set to auto so it could scroll over the background.

  7. #7
    Join Date
    Apr 2004
    Posts
    32
    I just ran into a problem last week with trying to use a fixed background within a div.

    It looked great under IE, but was broken under Mozilla and Netscape.

    When you change a background-attachment to fixed, it attaches it to the object under IE, but attaches it to the document for all other browsers it seems. Even IE for Mac attaches it to the document and not the object.

    It makes more sense to attach it to the object as all you have to do is attach it to the body if you really wanted it there.

    If you try to move the background to the center of your object, it moves out of alignment under IE.

    The solution I found was to create a div and set it to the exact measurements of the background but not to set it as fixed. Then create a child element with overflow set to auto so it could scroll over the background.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles