terryds Posted January 3, 2014 Share Posted January 3, 2014 See http://jsfiddle.net/terryds/H3A4M/ The margin-top i want to add isn't working... I've tried the margin-bottom, and it gives me nothing too... Please help me... Link to comment Share on other sites More sharing options...
Ingolme Posted January 3, 2014 Share Posted January 3, 2014 <a> is an inline element, so you can't give it margins like that. You can either use the line-height property or turn the element into a block. Link to comment Share on other sites More sharing options...
terryds Posted January 3, 2014 Author Share Posted January 3, 2014 But, when i turn it into a block element and give some value of its margin-top, it will leave white area at the top of the page.. Can you tell me how to fix that? Should i just use padding ? Link to comment Share on other sites More sharing options...
Ingolme Posted January 3, 2014 Share Posted January 3, 2014 If you turn it into a block element its margin is passed on to its parent element. One way to fix that is to give one pixel of padding on the parent element, or to give it a border. 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