Solved

Repeating bottom part of background image for a page

Posted on 2011-03-22
4
175 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 82

Expert Comment

by:Dave Baldwin
Comment Utility
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 82

Accepted Solution

by:
Dave Baldwin earned 125 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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 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 customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

771 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

11 Experts available now in Live!

Get 1:1 Help Now