开发者

How do I remove the space between two CSS floats?

开发者 https://www.devze.com 2023-03-30 14:05 出处:网络
I have a page desi开发者_如何学Gogned for tabbed page navigation. The top tabs are <li>s in a <ul> and nested in parent divs and a topmost header div. The header div consists of 3 child di

I have a page desi开发者_如何学Gogned for tabbed page navigation. The top tabs are <li>s in a <ul> and nested in parent divs and a topmost header div. The header div consists of 3 child divs, logo, logo2, and menu. The logo div is set to float left and other two to float right. But there is some unwanted space (or a fluid gap) between logo2 div and menu div. I want no space (or a space of single px) between these divs. You can see a working fiddle here. How can I solve this?

I am getting this

How do I remove the space between two CSS floats?

and I want this

How do I remove the space between two CSS floats?


Your fiddle shows a hug gap between logo and the menu when the window is resized. Is that what you want?

I think this is what you are after...

Change the floats to display:inline-block;s

Example: http://jsfiddle.net/jasongennaro/wVBxy/1/


Try removing the float: right from the menu element, or set it to float: left, depending on how you want logo2 to appear.

0

精彩评论

暂无评论...
验证码 换一张
取 消