Jump to content

Setting Static Background


Pesho

Recommended Posts

Hi all,

Can somebody tell me how I can set some pattern as a static background, e.g. the background should not move up and down as I scroll the page. Only the page content should move.

Also could you tell me how I can set a small image to appear numerous times and thus form the background?


10q,
Regards,
Pesho
Link to comment
https://forums.phpfreaks.com/topic/34109-setting-static-background/
Share on other sites

When you apply a background and you 'll want it to be static, then add [tt]background-attachment: fixed;[/tt] to your CSS

This then only scroll the content, the background will not move.

I'm not sure about your second question. Perhaps provide an illustration
Hello and thanks for the replies.

Maybe I'm wrong applying what you told me, but it doesn't work. What I did is add in my .css file:

.background {
background: transparent url(pattern.jpg) repeat fixed top left;
background-attachment: fixed;
}

and then writing the table code as follows:

<table width="770" border="0" align="center" cellpadding="10" cellspacing="0" class="background">


I guess I make a stupid mistake.

10q,
Pesho

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.