Solved

css layout

Posted on 2014-04-05
3
295 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
ID: 39980206
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
ID: 39980215
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
ID: 39980251
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will learn how to count occurrences of each item in an array.

930 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