- This topic is empty.
-
AuthorPosts
-
September 9, 2012 at 10:16 pm #39753Miela84Participant
Hi,
I’m trying to do an assignment for my class and I’m stuck on this logo being centered within navigation. I’ve been working on getting this right for hours and it’s driving me crazy.
I searched the forums and found this:
https://css-tricks.com/forums/discussion/18095/how-to-make-header-nav-divided-by-logo/p1The two examples aren’t actually centered when I try it though. The right side is kind of stuck to the logo and it moves when I resize the window.
Does anyone know how to center a logo in the middle of a nav bar? I’d like the nav bar to fill the page like in the picture.
Thank you in advance for your help.September 9, 2012 at 11:38 pm #109659TheDocMemberYou know what, Andy, I don’t think I’ve ever thought to do that before – pretty smart!
September 10, 2012 at 12:19 am #109660Miela84ParticipantThanks. That’s what I’m doing, sort of. I applied the class as a logo and then had the logo as a background image. All the nav is spaced out well and the logo is centered within it, but what I keep running into is the whole nav itself not being perfectly centered. I’d show you my code but I’m not sure how to put that in here. If I paste in my code (if you could tell me how) will it help you to help me? I want to learn from whatever mistake I’m making so I know how to do this in the future.
Thanks!
September 10, 2012 at 2:42 am #109665Paulie_DMemberYou can put your HMTL & CSS in Codepen.io and let us have a look.
September 10, 2012 at 8:25 am #109667SgtLegendMemberFrom an SEO standpoint there is nothing wrong with putting the logo in a list item as its still readable by Google and other search engines, however a screen reader would have a field trip with it since they read the source from top to bottom, left to right.
Since the logo would be in a list item a screen reader would go
– Home
– Stats
– Schedule
– Michiganetc…
September 11, 2012 at 1:02 am #109745Miela84ParticipantThanks for all your comments. I wasn’t thinking about SEO…and probabyl should. Some students in my class are trying to figure this centered logo situation out and haven’t gotten it yet. This is the closest I came and it’s a pretty pathetic attempt. Any ideas?
September 11, 2012 at 1:03 am #109746Miela84Participantprobably*
September 11, 2012 at 3:21 am #109752Kitty GiraudelParticipantThere you go : http://jsfiddle.net/P7PNj/1/.
September 11, 2012 at 4:40 am #109760Miela84ParticipantThanks HugoGiraudel, but I’m wondering, when I re-size the window the whole nav area isn’t centered. That’s the problem I’ve been having. It’s shifted more to the left. Am I missing something?
Thanks for that Andy, I’ll make sure I’ll add it next time.September 11, 2012 at 7:46 am #109775Kitty GiraudelParticipantThere : http://jsfiddle.net/P7PNj/2/.
September 11, 2012 at 7:51 am #109776chrisburtonParticipantHaving the same header layout, that is pretty smart. Although I dislike not having it inside an h1.
September 11, 2012 at 9:07 am #109785SgtLegendMember@andy_unleash as long as the logo comes before the navigation elements itself it would make more sense to the user using the screen reader, take the following for example:
For users using a screen read this makes sense as a site logo should always come before the main navigation to introduction the users position on the screen more formally, however something like the below would confuse the user.
The reason why is that screen readers look at the markup in the page not the layout itself as its impossible for a screen reader to understand what goes where and how a user interacts with it where are the DOM tree is a more solid structure for it to work with when presenting the content to the user.
Hope I didn’t misunderstand your reply.
September 11, 2012 at 4:53 pm #109816Miela84ParticipantThanks! I think I got it!! http://jsfiddle.net/P7PNj/6/
September 11, 2012 at 4:53 pm #109817Miela84Participantoops sorry this was before I refreshed to see other comments
September 11, 2012 at 8:29 pm #109843wolfcry911Participant -
AuthorPosts
- The forum ‘CSS’ is closed to new topics and replies.