Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2011-03-23
3
Medium Priority
?
638 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
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
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…
Suggested Courses

963 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