Jump to content

What Does margin: 13px 8px apply to?


XHTMLboy

Recommended Posts

Hi i'm new to CSS and i just wanted to know what value this applys to.e.g margin 15px 5px 15px 5px <-- Applys 15px to the top, right, bottom and left.But what does margin 15px 10px do. ? <-- how does that value get applyed?

Link to comment
Share on other sites

* margin:25px 50px 75px 100px; o top margin is 25px o right margin is 50px o bottom margin is 75px o left margin is 100px * margin:25px 50px 75px; o top margin is 25px o right and left margins are 50px o bottom margin is 75px * margin:25px 50px; o top and bottom margins are 25px o right and left margins are 50px * margin:25px; o all four margins are 25px

Link to comment
Share on other sites

* margin:25px 50px 75px 100px; o top margin is 25px o right margin is 50px o bottom margin is 75px o left margin is 100px * margin:25px 50px 75px; o top margin is 25px o right and left margins are 50px o bottom margin is 75px * margin:25px 50px; o top and bottom margins are 25px o right and left margins are 50px * margin:25px; o all four margins are 25px
Thankyou ApocalypeX for you help, but when ever i try to do background-position: 0 2px it makes the image go down. Why is this?, shoulden't it make the image go 2px to the left and right? and which way is to 2px ment to move the image to? Thanksyou for your time in taking a look :)
Link to comment
Share on other sites

Thankyou ApocalypeX for you help, but when ever i try to do background-position: 0 2px it makes the image go down. Why is this?, shoulden't it make the image go 2px to the left and right? and which way is to 2px ment to move the image to? Thanksyou for your time in taking a look :)
Background-position is x and y cordinates.So it would be 0 pixels to the right and 2 pixels from the top.
Link to comment
Share on other sites

Background-position is x and y cordinates.So it would be 0 pixels to the right and 2 pixels from the top.
Oooh i get it now, so background-position: 5px 10px; will go 5px to the right and 10px up. ok thanks alot ApocalypeX :)
Link to comment
Share on other sites

Actually, it would go 5px right and 10px down. 0,0 starts at the top left corner and goes out and down from there.
Oooh ok, i get it now. So 20px 30px would go 20px along starting at the top left and would go 30px down. Thankyou for the correction :)
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...