Ask Experts Questions for FREE Help !
Ask
    triconanz's Avatar
    triconanz Posts: 3, Reputation: 1
    New Member
     
    #1

    Sep 11, 2003, 10:10 PM
    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?
    triconanz's Avatar
    triconanz Posts: 3, Reputation: 1
    New Member
     
    #2

    Sep 11, 2003, 11:31 PM
    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?

    coreybryant's Avatar
    coreybryant Posts: 134, Reputation: 2
    Junior Member
     
    #3

    Sep 12, 2003, 05:26 AM
    Re: keeping an background image fixed within a tab
    ]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>

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Keeping my background still [ 9 Answers ]

Can anyone tell me if there is a way to keep the background on my webpage from scrolling with the text? I have an image I'd like to use and have the test scroll over it. I'm farely new to HTML so be thorough. Thanks

Air Hockey Table... [ 5 Answers ]

Does anyone know of a website I could go to to order an Air Hockey Table. Preferably in the Dallas, Tx area, bt ne place would work

Cell/Table Borders [ 4 Answers ]

Hi Everyone, I'm currently trying to build a website for my new business. I know a very good base about html and Dreamweaver which is the platform I'm using to build my site. I'm having a huge dilemma, my business partner wants to see the website a certain way, but I can't seem to get the...

Problem with IP routing table! [ 1 Answers ]

My IPGateway is NSG4000 (made in Taiwan), in its static routing table I want to assign IP 0.0.0.0 and Subnet mask 0.0.0.0. But I don't know why it can't assign that IP and SM :confused: . Are there any other way to assign IP and SM 0.0.0.0? Please help me! Thanks!

Div Vs Table [ 3 Answers ]

Just a quick question. I've seen a few pages on the internet about using DIV tags instead of tables. Could someone just quickly tell me what's the best to use? I could imagine DIV tags would provide you more control via CSS, but I can also see that they would be a pain in the ass to use. ...


View more questions Search