Solved

CSS3 Multiple Background images vertical

Posted on 2014-01-21
3
434 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
3 Comments
 
LVL 38

Accepted Solution

by:
Tom Beck earned 500 total points
Comment Utility
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
Comment Utility
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
Comment Utility
perfect, thanks for the help.  It's always the simplest solution.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
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…

743 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

15 Experts available now in Live!

Get 1:1 Help Now