Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Internet & the Web (https://www.askmehelpdesk.com/forumdisplay.php?f=177)
-   -   Keeping an background image fixed within a table (https://www.askmehelpdesk.com/showthread.php?t=564)

  • Sep 11, 2003, 10:10 PM
    triconanz
    Keeping an background image fixed within a table
    Is is possible to have a fixed background image within a table or a cell without tiling so that when the entire page is being scrolled, the text and the table scroll, but the image stays in the middle of the page the entire time?

    If I want to insert an image in the background of a table and also want only the text to move but not the image... is there a way to do this?

    Or would it be something that would have to be done using frames?
  • Sep 11, 2003, 11:31 PM
    triconanz
    Re: keeping an background image fixed within a tab
    So to add to my own question:

    Are there any table attributes that will do the same as the following:

    You can add this to the opening body statement:
    <body bgproperties="fixed" background="images/background.gif">

    bgproperties="fixed" is one way to do it. You can also use a style sheet - you place this before the </head>:

    <style type="text/css">
    BODY
    {
    background: white url('images/background.gif') fixed;
    }
    </style>

    and if you want ths image only once & not tiled:
    BODY
    {
    background: white url('images/backgrounds/generichdr.gif') fixed no-repeat;
    }
    </style>


    The code above is used in a <body> tag. Is there something similar attributes that can be placed in a <table>, <tr>, or <td> tag?

  • Sep 12, 2003, 05:26 AM
    coreybryant
    Re: keeping an background image fixed within a tab
    Quote:

    ]The code above is used in a <body> tag.
    Actually this is also used in the <HEAD> within the style tag

    You can try this:

    <html>
    <head>
    <style type="text/css">
    .tbl1
    {
    background: url('images/back.gif');
    background-repeat: no-repeat;
    }
    </style>
    </head>
    <body>
    <table border="1" cellpadding="0" cellspacing="0" width="100%" class="tbl1">
    <tr>
    <td width="100%"> </td>
    </tr>
    </table>
    </body>
    </html>

  • All times are GMT -7. The time now is 07:32 PM.