- This topic is empty.
-
AuthorPosts
-
September 21, 2012 at 2:34 pm #39949
karthick_doosra
Memberi’ve attached a link below for a web page where i am facing the problem of the nav elements breaking into two lines on a smaller screen or a screen resize and also the section “ABOUT US” faces the same problem where one of the boxes breaks into a seperate line..
http://f7-preview.biz.nf/karthick.co.nr/
also a screen shot:
http://i.imgur.com/PNaZz.png
http://i.imgur.com/AdJE9.pngSeptember 21, 2012 at 2:48 pm #110518matt_sanford
Participantfloat ul#menu to the right. set your margin to “margin: 0 2% 0 0;” putting a margin on the left was the problem. If you make the browser small enough it will go to two lines, this is un-avoidable without using media queries. This fix gives you a greater amount of real estate before that happens though.
cheers,September 21, 2012 at 3:00 pm #110524karthick_doosra
Memberhey but what about the “about us section”
September 21, 2012 at 3:02 pm #110525matt_sanford
ParticipantI don’t understand what you want to accomplish with the “About us” section.
September 21, 2012 at 3:06 pm #110526karthick_doosra
Memberyou will find 3 divs in the about us section.if you resize the screen you will find the last div(box) going down
September 21, 2012 at 3:21 pm #110527matt_sanford
ParticipantNot totally sure about this. I am thinking that the floats are what is messing it up. Try not floating them, setting the display to inline block and just using margins to position them .
September 21, 2012 at 3:41 pm #110528wolfcry911
Participantthe problem is the borders. at a certain point 3 * 27.5% + 2 * 6% + 6 * 0.5em becomes too large for the container. You could reduce the width of each div; or change the box-sizing from content-box (standard box model) to border-box, which will include the borders in the 27.5% figure
September 21, 2012 at 4:13 pm #110530karthick_doosra
Memberhey thanks your solution of border-box worked.Would be nice if you help me solve the other one too
September 21, 2012 at 4:16 pm #110532matt_sanford
ParticipantDidn’t i already do that? With this “float ul#menu to the right. set your margin to “margin: 0 2% 0 0;” putting a margin on the left was the problem. If you make the browser small enough it will go to two lines, this is un-avoidable without using media queries. This fix gives you a greater amount of real estate before that happens though. cheers,” ?
September 21, 2012 at 4:17 pm #110533karthick_doosra
Memberi tried doing that :-( it didnt work..
-
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.