Solved

CSS Html expanding length image repeat

Posted on 2013-01-22
5
160 Views
Last Modified: 2013-06-05
I have a web page with the css set to have a background image fill the screen
body {
	line-height: 1;
	color: black;
	background: white;
	background-image: url("../img/tdb/wood-54.jpg");	
	background-position: top;
	background-repeat: repeat-x;
	background-color: #e8e3D0;
	font-family: Georgia, serif;
}

Open in new window

I then have css (.content) to have another centered H1 which has in image applied to it that stays centered at all times. There are tables and other content within this.
.content {
	width: 980px;
	margin: 0 auto;
}

.content h1 {
	background-image: url(../img/tdb/clip-paper.png);
	background-repeat: no-repeat;
	background-position: center top;
	width: 960px;
	height: 920px;
}

Open in new window


This all works fine. The image is a book and I can put content "on the page" so it looks as we want. The trouble is when the content is longer than the book. Width is not an issue as I have it set at 960px. I have made the book so that there is a top and bottom image and I now have a centre image that can be repeated as necessary to stretch the book while retaining its width.

I do not know what design to use to make this happen. Tips?

Thanks and sorry for the extended babble.

Cheers
0
Comment
Question by:Halon
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 25

Expert Comment

by:Kyle Hamilton
ID: 38806561
please post a link to your page
0
 

Author Comment

by:Halon
ID: 38806592
Its internal, sorry. Ill try and post an example page somewhere when i get near a computer
0
 
LVL 30

Expert Comment

by:LZ1
ID: 38806604
Is there a live link you can show us?  

It sounds like you need to clear floats or possibly give a static height and set overflow.
0
 

Accepted Solution

by:
Halon earned 0 total points
ID: 38807299
I got it working with 3 different images and divs
.contentAreaTop {
	background-image: url(../img/tdb/clip-top.png);
	background-repeat: no-repeat;
	background-position: center top;
	width: 960px;
	height: 215px;
}

.contentAreaMiddle {
	background-image: url(../img/tdb/clip-mid.png);
	background-repeat: repeat-y;
	background-position: center;
	width: 960px;
}

.contentAreaBottom {
	background-image: url(../img/tdb/clip-bottom.png);
	background-repeat: no-repeat;
	background-position: center;
	width: 960px;
	height: 100px;
}

Open in new window

0
 

Author Closing Comment

by:Halon
ID: 39221478
Its me
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses four methods for overlaying images in a container on a web page
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question