Hosting Software News & Commentary Hosting Software News & Commentary Hosting Software News & Commentary

One of the webdesigners I frequently work for wanted to have a website with a background image that stretches with the dimensions of the clients computerscreen. See this example and play a little with the size of your window.

In order to achieve this I’ve added code to the existing Cascading Stylesheet:

#stretch-background {
position:absolute;
z-index:1;
top:0;
left:0;
width:100%;
min-width:1024px;
height:100%;
overflow:hidden;
}
#stretch-background img {
display:block;
width:100%;
height:auto;
border:0;
}
#stretch-link {
display:block;
position:absolute;
right:10px;
bottom:2.5em;
width:54px;
height:21px;
text-indent:-3000em;
overflow:hidden;
z-index:100;
}

  1. No user reviews yet.


Leave a Reply





Blogroll