Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

background stays in plce but table moves when scrolling

Status
Not open for further replies.

lmarshall

MIS
Joined
Jun 11, 2002
Messages
108
Location
US
I put my background in the body tag and put a table with 3 colomns over it. My problem is when I scroll my table scrolls up but my background stays the in place. I would put my background image as the background in my table but when I do that it repeats itself. Please Help!!
 
Hi lmarshall!

By default, background image should not stay in one plase, especially when it's inserted into BODY tag... But anyway you can set the background image to be scrolled or fixed using CSS:

[ol]
[li]open page in DW;
[li]open CSS Styles window (Window > CSS Styles);
[li]press New Style (plus sign) at the bottom of the CSS Styles window;
[li]type name of new style at the New Style dialog window, select Type (probably you'll need Make Custom Style) and select where it should be defined - either separate file or in this document (separate file would be better but if you are not OK with it yet choose This Document Only);
[li]select Background in the Style Definition diallog window (that will pop up immediately after you click OK in the New Style dialog window),
[li]select the setting you need under Attachment:
[ul]
[li]fixed - background image stays in one place all the time,
[li]scroll - bg image moves with all other content when scroll the page,
[/ul]
[li]select BODY (or TABLE) tag to apply the style:
[ul]
[li]click anywhere on the page,
[li]select <body> at the left bottom corner,
[li]right click on it and select Set Class > you class.
[/ul]
[/ol]

It will work OK in IE and NN6. But there'll be a problem in NN4 - bg image will repeat itself in each table cell. To fix it you need to create transparent gif (1x1 pixel) and set it as the background for each cell.

Is it clear?

P.S. and don't forget to remove background image settings from the BODY tag when you apply style. Good Luck! :-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top