Joel 0

The navigation text in the attached web page has fallen outside of its parent container, how can I fix it?

  • i would like the "search" text in the nav to float in the right, how can i make it? Joel 11 months ago
  • http://chasamsofer.com/welcome2.html Joel 11 months ago

4 answers

u62 5
1
point

All the contents of your div are floated You need to either put some html in there that isn't floated and apply the 'clear' CSS property to it, or use a self-clearing technique (google for "css self-clearing").

Answered 11 months ago by u62
danwellman 3775
1
point

It's most likely because the floated list items aren't being cleared. Try adding a clearing div after the <ul>:

<div class="clear"><!-- --></div>

Then have the css:

.clear { clear:both; }

You may need a little negative margin-top on the <ul> too to pull it up into place

Answered 11 months ago by danwellman
0
points

all your list items are floated left and your links are inline, and that's what happens....

best to swap float:left with display: inline to get a horizontal menu from an unordered list and add some margin to the links

Answered 11 months ago by Tony Crockford
Joel 0
0
points

i just added:

header #nav ul{

margin: 0;
padding:0;

and it cleared, check it out

Answered 11 months ago by Joel
  • @Joel Please use comments for replies to answers and other comments, thanks! Matthew Brindley 11 months ago
Log in to post your answer