Solved

CSS Html expanding length image repeat

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

Independent Software Vendors: 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

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

735 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