Solved

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

Posted on 2011-03-23
3
565 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:gurvinder372
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 500 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

As a result of several questions about how to use Bootstrap I thought it would be a good idea to write down the development aspect of creating a Bootstrapped website in as little time as possible. Part 1 of this article will only concentrate on g…
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.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

760 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

18 Experts available now in Live!

Get 1:1 Help Now