Solved

CSS Html expanding length image repeat

Posted on 2013-01-22
5
159 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hta File displays dynamic File names 4 65
Ajax on ASP 2 65
CSS (jquiry mobile) question 3 32
iframe stay to the left of page 5 26
This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

738 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