ShynedM Posted June 9, 2016 Share Posted June 9, 2016 Hi, I've downloaded a template and I'm now editing it in Dreamweaver. I am trying to center the top navigation menu, and from some reason I can't do it. Please see attached screen shot of the style sheet. Any advice would be helpful. Many thanks Link to comment Share on other sites More sharing options...
Ingolme Posted June 9, 2016 Share Posted June 9, 2016 It's probably because the elements inside are floated to the left. If you remove the float rule from the menu items, set their display to inline-block and at the text-align property of the parent to "center" it probably will work. Link to comment Share on other sites More sharing options...
ShynedM Posted June 15, 2016 Author Share Posted June 15, 2016 Thanks for your reply. I doesn't work and I think it's mainly because I don't know where to change it on the main css... Link to comment Share on other sites More sharing options...
ShynedM Posted June 15, 2016 Author Share Posted June 15, 2016 at the moment it looks like that: /* Top Nav */ .top-nav li a, .background-white .top-nav li a { color: #002633; font-size: 0.9em; padding: 0.7em 1.25em; } nav { border-bottom: 4px solid rgba(0, 0, 0, 0.05); border-top: 1px solid rgba(0, 0, 0, 0.05); padding: 1.7em 0; position: inline-block; z-index: 2; Link to comment Share on other sites More sharing options...
Ingolme Posted June 15, 2016 Share Posted June 15, 2016 Set the display property (not position) of the list items to "inline-block". Then set the text-align property of their container (probably .top-nav) to "center". Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now