We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

CSS - Spacing Buttons without indenting them to the right

Alan
Alan asked
on
Medium Priority
329 Views
Last Modified: 2012-05-11
Hi All,

I am a beginner with CSS, so this is likely an easy question, but I am having difficulty spacing nav buttons on my play site.

I want them to be spaced apart, but not indented to the right.

I have attached two images and the CSS files:

Version 1) Buttons are not spaced (vertically), but are left-aligned to the page.

Version 2) Buttons now spaced vertically, but the margin applies all the way around, thus shifting the buttons to the right by 10px.


How do I get the vertical separation without the indent (not using margin I guess, but what do I use?)

Thanks,

Alan. Version 1 - Not spaced, but left aligned Version 1 - Not spaced, but left aligned Version-1---navbar.css Version 2 - Spaced, but no longer left aligned to the page Version-2---navbar.css
Comment
Watch Question

Rikin ShahMicrosoft Dynamics CRM Consultant
CERTIFIED EXPERT

Commented:
Hi,

Instead of using margin: 10px use this-

margin-left: 10px ;
margin-top: 5ps;
margin-bottom: 5px;
Microsoft Dynamics CRM Consultant
CERTIFIED EXPERT
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
AlanConsultant
CERTIFIED EXPERT

Author

Commented:
Perfect - Thanks!
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.