Solved

CSS Html expanding length image repeat

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

914 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now