Welcome visitor
* Login
* Register
It is currently March 19th, 2019, 7:52 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Help with my background
PostPosted: August 4th, 2009, 12:34 am 

Posts: 46
Hi, i have a background image that is tiled through all the screen. do you know if it is possible to make it tile only through the upper part of the screen?


Top
 Profile  
 
  Re: Help with my background
PostPosted: August 4th, 2009, 1:10 am 

Posts: 57
here are two options:

this is going to tile the image only on the x axis
<style type="text/css">
body, html{background:url("bg.jpg") repeat-x;}
</style>

the problem would be if the image wouldnt be large enough; the other way of doing this is to create a div with z-index as 0 position:fixed and with the image as the background,
<div style="width: 100%; height: 70%; z-index: -1; background:url('bg.jpg'); position: fixed; top:0px"></div>

and dont put any content inside this div, use it only as a background div as you would with the bg image.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron