Solved

CSS3 Multiple Background images vertical

Posted on 2014-01-21
3
442 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
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…

777 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