Solved

CSS3 Multiple Background images vertical

Posted on 2014-01-21
3
450 Views
Last Modified: 2014-01-22
I'm new to multiple backgrounds in css3 but a peer of mine said that it might fix my problem.  I have a website with a content background that is an image that I need to stack in the middle.  So I have sliced an image into three different images and applied the css but I am having some repeating problems.

Here is site:

http://www.sendright.com/draft/lauren

code snippet:

#page {
      /*background: url('images/page_bg.png')no-repeat;
      background-size:100%;
      border: 1px solid #bbb;*/
      
      background-image: url('images/page_bg_top.png'),
            url('images/page_bg_middle.png'),
            url('images/page_bg_bottom.png');
      background-repeat: no-repeat, repeat-y, no-repeat;
      background-size:100%;
      border-radius: 10px;
}
0
Comment
Question by:gwarcher
[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 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
ID: 39799638
Remove the second and third background images from #page. Adjust the background-repeat to background-repeat:no-repeat.

Add the second background image to #main. Add background-size:100%

Add the third background image to the footer,  #colophon. Add background-size:100% and height:68px.

That may not be all you need to do, but it will get you close.
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
ID: 39801370
You need to manage and position in 3 dimensions and manage the stacking order of the images.

This page with multiple backgrounds and transitions might help

You may want to use percentages for the positioning if you are trying to keep the page responsive, though you can also script re-alignment if you want to beat yourself up.

Cd&
0
 

Author Closing Comment

by:gwarcher
ID: 39802085
perfect, thanks for the help.  It's always the simplest solution.
0

Featured Post

Industry Leaders: 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

When applying CSS to your HTML, there are many different ways to select which element(s) the CSS applies to.  Some of these selectors are more commonly known and used than others - Here are the more common ones: #X - Matches an ID of X .X - Matche…
As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
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…
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

728 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