- This topic is empty.
-
AuthorPosts
-
August 15, 2013 at 9:04 am #146911
tirengarfio
ParticipantHi,
I have this site: http://www.ziiweb.com/
As you can see the navbar is 41% width and float: right, but to make the float: right work, I have to remove the width: 41%, why? is there any incompatibility between the width and float?
<header class="tab-content cabecera"> <a class="logo pull-left" href="/"> <img src="images/logo1.png" width="250px" alt="ziiweb"/> </a> <div class="social"> <div class="fb-like" data-href="http://www.facebook.com/!!!" data-send="false" data-layout="box_count" data-width="450" data-show-faces="false"></div> <g:plusone align="middle"></g:plusone> </div> <nav> <ul class="nav nav-pills"> <li class="active"><a href="#">Inicio</a></li> <li><a href="#">Qué ofrecemos</a></li> <li><a href="#">Trabajos</a></li> <li><a href="#">Contacto</a></li> </ul> </nav> a.logo { vertical-align: top; width: 37%; } .social { display: inline-block; width: 21%; } nav { display: inline-block; float: right; width: 41%; }
Im using FF 22
August 15, 2013 at 9:19 am #146914Paulie_D
Memberbut to make the float: right work, I have to remove the width: 41%
What do you mean by work “right”?…it looks like it’s working to me.
Perhaps you meant to float the ‘ul’ right?
August 15, 2013 at 10:06 am #146925tirengarfio
ParticipantWhat do you mean by work “right”?…it looks like it’s working to me.
I mean “but to make the ‘float: right’ work”.
As I say in my post, for me it does not work (it doesn’t float the menu on the right) when I define a width.
If you’re floating then why use inline-block?
Yes, you are right, I can remove ‘inline-block’.
August 15, 2013 at 10:13 am #146934tirengarfio
ParticipantIt is on the left for me (not floating). Only if I remove width: 41%, it floats on the right.
August 15, 2013 at 10:14 am #146935tirengarfio
ParticipantTry to toggle width: 41%. Is it moving for you when you toggle? For me yes.
August 15, 2013 at 10:28 am #146943Paulie_D
MemberAs I say in my post, for me it does not work (it doesn’t float the menu on the right) when I define a width.
When I checked you were floating the nav that wraps the menu..not the menu itself.
The ul (menu) is not as wide as the nav so it’s sits on the left of it until told not to.
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.