Solved

Repeating bottom part of background image for a page

Posted on 2011-03-22
4
181 Views
Last Modified: 2012-05-11
I have a background image that's a gradient (lighter at the top that transitions to a darker checkered pattern at the bottom) and I want to repeat the darker section of the background image for as long as the page is.  What is the best way to go about this?  Thanks for any help.
0
Comment
Question by:mike2036
  • 2
4 Comments
 
LVL 83

Expert Comment

by:Dave Baldwin
ID: 35194254
As long as it is a solid color at the bottom, I usually make the background color the same as the part at the bottom.
0
 
LVL 83

Accepted Solution

by:
Dave Baldwin earned 125 total points
ID: 35194272
With the checkered pattern you may have to just make a very tall background image.  I think one of my sites has one that is 2500px tall.
0
 
LVL 14

Expert Comment

by:Designbyonyx
ID: 35194391
background: #000 url(/path/to/bg-image.png) repeat-x left top;

Where #000 is the bottom most color of the gradient.
0
 
LVL 16

Expert Comment

by:rbudj
ID: 35194437
Since you have a pattern, a solid color is not what you are looking for. Create a container div with 100% width and background set to the full height of the gradient with repeat-x. Then just set the background of the body to the full color pattern.
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

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…
The viewer will learn the basics of jQuery including how to code hide show and toggles. 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…

863 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

24 Experts available now in Live!

Get 1:1 Help Now