Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How do I stack these two divs on top of each other?

Posted on 2011-03-23
3
Medium Priority
?
629 Views
Last Modified: 2012-05-11
I have a site here: http://208.109.84.228/~hibbsinc and I need to stack the "banner" and "searchBox" DIVs on top of each other so it looks like the attached image.

Any help would be appreciated. Divs
0
Comment
Question by:Donnie Walker
[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 40

Expert Comment

by:Gurvinder Pal Singh
ID: 35196798
you need to use
position:absolute

give the same position:absolute, and top and left style values to both
0
 
LVL 2

Accepted Solution

by:
MINORITYmaN earned 2000 total points
ID: 35197314
i would do that:

#banner {
float: right;
font-size: 80%;
text-align: right;
margin-top: 20px;
margin-right: 45px;
color: white;
width: 72%; /* enlarge the banner*/
}

Open in new window

#searchBox {
background: url("../images/search.jpg") no-repeat right top;
float: right;
width: 160px;
text-align: right;
margin-top: 10px; /* change 70px margin to 10px margin */
margin-right: 45px;
}

Open in new window

0
 

Author Closing Comment

by:Donnie Walker
ID: 35198882
thanks
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
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.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
Suggested Courses

718 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