Jump to content


Photo
- - - - -

Navbar Off Center


  • Please log in to reply
3 replies to this topic

#1 dmgusa

dmgusa

    Member

  • Members
  • 22 posts
  • Country: Country Flag

Posted 10 April 2013 - 11:54 PM

Hello,

 

I'm having trouble with my navbar: 

Please Login or Register to see this Hidden Content

 

It's at the very top and as you can see it's off center.

 

This is the coding I'm currently using:

Please Login or Register to see this Hidden Content

I was trying to get the entire navbar to run the length of the white content area. I assume it's a padding problem, but I'm not sure how to get to that.

 

any help is greatly appreciated--thanks!

 

 

 



#2 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 10 April 2013 - 11:59 PM

Hi there, the navbar is floated left as standard in the framework and will run the width of the content-area. Looking at the css you've used above you've overridden the width to make it 1000px wide. If you remove the width element from your code the navbar will go back to covering the content area.



#3 dmgusa

dmgusa

    Member

  • Members
  • 22 posts
  • Country: Country Flag

Posted 11 April 2013 - 03:13 PM

Sorry, not the content area. The content area is smaller than the white box I created. Is there a way to make it wider without it going off center anyway? Thanks



#4 James B

James B

    Advocate

  • Moderators
  • 5126 posts
  • LocationSurrey - UK
  • Country: Country Flag

Posted 12 April 2013 - 12:38 AM

Do you mean you want a longer navbar but the tabs within the navbar to be centered on the page?

 

You could do this with css but you'd need to edit a fair bit. Removing the float:left from most of the containers and then using margin:auto on the main navigation li to get it to stay centered.