CSS - including right and left shadow images in a style

Hi:

I have a fixed-width web page that has a shadow on the left of the page and a shadow on the right of the page.  I currently handle this in the markup with 3 divs:

<div class="leftShadowHeader" />
<div class="headerBox" />
<div class="rightShadowHeader" />

I would like to create one class called headerBoxCombined that includes the left and right shadows.  The CSS for the divs above is as follows:

.headerBox
{
    width: 785px;
    height: 76px; /**/
    padding: 0px;
    background-image: url('hdco_Header_wide_base.png');
    background-repeat: no-repeat;
}

.leftShadowHeader
{
    /*border: thin solid #FF0000;*/
    background-image: url('base_left.gif');
    float: left;
    width: 22px;
    background-repeat: repeat-y;
    height: 76px;
}

.rightShadowHeader
{
    /*border: thin solid #FF0000;*/
    background-image: url('base_left.gif');
    float: right;
    width: 22px;
    background-repeat: repeat-y;
    height: 76px;
}

Any help in creating the new style would be greatly appreciate.

rbs




<div class="leftShadowHeader" />
<div class="headerBox" />
<div class="rightShadowHeader" />

.headerBox
{
    width: 785px;
    height: 76px; /**/
    padding: 0px;
    background-image: url('hdco_Header_wide_base.png');
    background-repeat: no-repeat;
}

.leftShadowHeader
{
    /*border: thin solid #FF0000;*/
    background-image: url('base_left.gif');
    float: left;
    width: 22px;
    background-repeat: repeat-y;
    height: 76px;
}

.rightShadowHeader
{
    /*border: thin solid #FF0000;*/
    background-image: url('base_left.gif');
    float: right;
    width: 22px;
    background-repeat: repeat-y;
    height: 76px;
}

Open in new window

RBSAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rjdownCommented:
You can't apply two or more different backgrounds to a single DIV. What you need to do is combine the images into one and use that as the background image for the entire DIV. You will probably need to adjust the DIV width accordingly (+44px) but you can then re-adjust for its content (if any) by applying padding, e.g. padding: 0 22px;
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
RBSAuthor Commented:
Nice, neat, simple.  Thanks.

rbs
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.