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 over 7 years ago
  • http://chasamsofer.com/welcome2.html Joel over 7 years 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 over 7 years ago by u62
danwellman 5600
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 over 7 years 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 over 7 years 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 over 7 years ago by Joel
  • @Joel Please use comments for replies to answers and other comments, thanks! Matthew Brindley over 7 years ago