简体   繁体   中英

Float Left and Float Right

I'm modifying a website and have ran into some issues with my nav bar and main content appearing directly above one another.

You can see it here: http://kennedys.williamoconnor.me/

Does anybody know what in my CSS I can change to have the content appear beside one another? I believe it is float left on the id #left and float right on the id #content

I have two ID's within my #wrapper and I can't seem to get them to appear correctly.

Thanks!

#contentwrap删除边距

There are two solutions:

1) Remove margin-top, and reduce margin-left to 20px

#contentwrap {
  margin: 0 0 0 20px;
}

2) Remove all margins and make #contentwrap float: right (example http://i.imgur.com/VpLORSj.png )

#contentwrap {
  margin: 0;
  float: right;
}

The first option is better in many cases, especially if you wanna change width or margins betweens div's.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM