שלח תשובה

זירת השאלות

578
צפיות
6
תשובות

CSS question…

,‏ 19 במרץ, 2004


I have a table with 3 TD's in it and the heught of the table is 100%.
in the middle one I want to put an image that will function as a background.

The thing is that I want the image to be attached to the bottom of the table and I want to be able to scroll the text over it without the image scrolling up. or the whole page.

How can I do it?

Thanks

תגיות:

6 תשובות

  1. ניר טייב הגיב:

    here is


    you need to do this:

    for not backGround scrolling:
    backGround-attachment: fixed;

    for backGround position:
    background-position: bottom right, bottom left or bottom center;

    for More click on this link

  2. mynameispepper הגיב:

    זה עזר לי קצת אבל זה עדיין לא עובד
    הנה הקוד:


    <html>
    <head>

    </head>

    <body marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">

    <table border="0" cellpadding="0" cellspacing="0" width="300" height="100%">
    <tr>
    <td width="50" bgcolor="#000000"> </td>
    <td style="background : url(bg.jpg); background-repeat: no-repeat; background-position: bottom left; background-attachment: fixed;">
    <font color="red">
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    fsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaffsdfsaf
    </font>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    <br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
    </td>
    <td width="50" bgcolor="#000000"> </td>
    </tr>
    </table>

    </body>
    </html>

    הצלחתי לה.צמיד את הרקע לתחתית ה TD אבל העייה היא שאני לא רוצה שכל העמוד יגלל אלא רק הטקסט. מה לעשות?

    תודה

  3. ניר טייב הגיב:

    הנה
    כדי לעשות גלילה רק לתא המסוים תשתמש ב-overFlow

    for vertical scroll:
    overFlow-y: auto or scroll;

    for horizintal scroll
    overFlow-x: auto or scroll;

    The both in CSS

  4. mynameispepper הגיב:

    עשיתי ככה…

    <td style="background : url(bg.jpg); background-repeat: no-repeat; background-position: bottom left; background-attachment: fixed; overFlow-y: Auto;">

    וזה עדיין לא עובד. לזה התכוונת?

  5. ניר טייב הגיב:

    תעלה את הדף בבקשה
    כך אני אוכל לעזור לך יותר.
    ושנה ב-overFlow מ-auto ל-scroll יהיה אמור להופיע לך גלילה באחד מצידי התא

  6. ניר טייב הגיב:

    נזכרתי
    overFlow עובד רק אלמנטים שמוגדרים כקופסא (box) ז"א שאתה צריך להגדיר אורך ורוחב לתא ואז זה יעבוד לך…

שלח תשובה