Solved

css layout

Posted on 2014-04-05
3
293 Views
Last Modified: 2014-04-11
I have the following html (see below) and the result is not what I am looking for. The #nav and #search are below the #logo and not next to #logo.

Please see pic for what I am looking for.
final result

 
 <div id="header">
        <div id="logo"></div>
        <div id="search">search</div>
        <div id="nav">
            <ul>
                <il><a href="">home</a></il>
                <il><a href="">home</a></il>
                <il><a href="">home</a></il>
                <il><a href="">home</a></il>
                <il><a href="">home</a></il>
            </ul>
        </div>
    </div>

Open in new window


and css code:
#logo {
	width: 280px;
	height: 100px;
	background-image:url(images/logo.jpg)
}
#search {
	float:right;}
	
#nav {
	width: 680px;
	text-align:center;
}

Open in new window

0
Comment
Question by:leblanc
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
Comment Utility
Try adding float:left to the logo.  The EOL at the end of the logo div forces the rest of the content to start on the next line.

If that does not solve it then post a link to the page so we can do diagnostics.

Cd&
0
 
LVL 1

Author Comment

by:leblanc
Comment Utility
It works. But now I have #nav and #search. I'd like #search to be on top and #nav at the bottom. Thx
0
 
LVL 53

Expert Comment

by:COBOLdinosaur
Comment Utility
So I guess you are assuming that I can see across the internet into you mind and determine what it looks like without a link or any other hint.  Nope, I do not have telepathic capabilities.  I need specifics.

Cd&
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …

771 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

10 Experts available now in Live!

Get 1:1 Help Now