CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 25th, 2013, 10:43 AM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
Homework - Stubborn Navigation

I've recently been altering an existing website to become responsive/fluid/flexible.

One of the biggest issues I was having was how to get the nav more responsive.

I came across a good example at http://www.hongkiat.com/blog/responsive-web-nav/ and set about making it more in keeping with my website.

I'm actually stumped on something which is more than likely going to take you guys seconds to solve - making my links centre inside the nav div.

Make sure your browser is more than 767px (preferably > 800px) or you won't see the issue.

HTML
CSS

Thank you in advance!

Reply With Quote
  #2  
Old January 25th, 2013, 12:46 PM
DonR DonR is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 464 DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 29722 Folding Title: Starter FolderFolding Points: 29722 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 2 Days 1 h 24 m 32 sec
Reputation Power: 216
in your descurt.css file, line 204 nav li rule:
get rid of display:inline;
and add float:left; and padding: 0 22px;

this should bring each of the list items out to a nice equi-distant arrangement .

Reply With Quote
  #3  
Old January 25th, 2013, 01:01 PM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
Thanks for the suggestion. I'm away from the computer at the moment but get the impression this wont allow the links to be flexible between browser widths 768-980px. Am I wrong? I'm looking for the padding between the links to increase/decrease as the browser window size changes.

I've achieved the centralling on my original concept at www.designercurtains.biz

Reply With Quote
  #4  
Old January 25th, 2013, 04:38 PM
DonR DonR is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2009
Posts: 464 DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)DonR User rank is Captain (20000 - 30000 Reputation Level)  Folding Points: 29722 Folding Title: Starter FolderFolding Points: 29722 Folding Title: Starter Folder
Time spent in forums: 2 Weeks 2 Days 1 h 24 m 32 sec
Reputation Power: 216
yea, that padding won't work for a variable width.
I'm not sure how to go about that.

Reply With Quote
  #5  
Old January 25th, 2013, 04:59 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,835 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 22 h 10 m 33 sec
Reputation Power: 4192
rdbrotherton, are you aware that you're mixing XHTML 1.0 and HTML5? You should pick one (I recommend HTML5) and then fix the errors with the help of http://validator.w3.org/ and http://jigsaw.w3.org/css-validator/ (under "more options", make sure it's set it to use "CSS level 3").

I'll suggest a solution but I should mention that it doesn't work in older versions of IE, e.g. IE7. It is simply to give the list-items "display:table-cell" and the <ul> "display:table".
__________________
Spreading knowledge, one newbie at a time. I'm available for hire at Dynamic Site Solutions.

Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

Remember people spend most of their time on other people's sites (so don't violate web design conventions).

Reply With Quote
  #6  
Old January 26th, 2013, 02:20 AM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
Quote:
Originally Posted by Kravvitz
rdbrotherton, are you aware that you're mixing XHTML 1.0 and HTML5? You should pick one (I recommend HTML5) and then fix the errors with the help of http://validator.w3.org/ and http://jigsaw.w3.org/css-validator/ (under "more options", make sure it's set it to use "CSS level 3").

I'll suggest a solution but I should mention that it doesn't work in older versions of IE, e.g. IE7. It is simply to give the list-items "display:table-cell" and the <ul> "display:table".


I had wondered as the <nav> tag was being used, but hoped it was just me not realising it was available before HTML5.

Thanks for the help.

Reply With Quote
  #7  
Old January 27th, 2013, 09:51 AM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
Kravvitz - thanks for your help with that. I've re-written the page in HTML5 and started again with the navigation. I've gotten it to work well enough for my liking, however I seem to have found a strange bug.

Viewing on my iPhone, the menu appears how it should. I click the menu and it drops to reveal the links. The bug appears when I rotate my iPhone (to landscape), the links font appears to increase in size....

Solutions greatly appreciated, as always!

Reply With Quote
  #8  
Old January 27th, 2013, 05:01 PM
Kravvitz's Avatar
Kravvitz Kravvitz is offline
CSS & JS/DOM Adept
Dev Shed God 30th Plane (19500 - 19999 posts)
 
Join Date: Jul 2004
Location: USA
Posts: 19,835 Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level)Kravvitz User rank is General 48th Grade (Above 100000 Reputation Level) 
Time spent in forums: 6 Months 1 Day 22 h 10 m 33 sec
Reputation Power: 4192
Try setting the "-webkit-text-size-adjust" property on that sub-menu. I would suggest you do so within an @media rule that targets smart-phone screen sizes.

Reply With Quote
  #9  
Old January 28th, 2013, 01:23 PM
rdbrotherton rdbrotherton is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2012
Posts: 22 rdbrotherton User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 20 m
Reputation Power: 0
Quote:
Originally Posted by Kravvitz
Try setting the "-webkit-text-size-adjust" property on that sub-menu. I would suggest you do so within an @media rule that targets smart-phone screen sizes.


Awesome little tip there Kravvitz. Thanks for all your help on this subject

Will I ever retain any of this knowledge!?!?

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Homework - Stubborn Navigation

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap