Hello, On my website I have 4 images that run horizontal along my page. The image called "Civil" has some spacing to the right that is too large and not consistent with the images. Any help on fixing this so that it is even with the rest of the images would be great. Thanks, http://petrowest.squarespace.com/
your content area is 930px wide with four columns. Each image is 207px wide. 207*4 = 828px 930 - 828 = 102px (total combined gap between colums)
Since we are only concerning ourselves the 3 gaps on the interior of the page we now do: 102 / 3 = 34px (gap between each column)
now just divide that by two and you get the amount of margin each column should have. 34 / 2 = 17px.
Now because we don't want any extra padding on the left of column1 we want to only add padding to the right. (CSS Shortcut, combining all sides in one statement: margin: top right bottom left)
On my website I have 4 images that run horizontal along my page. The image called "Civil" has some spacing to the right that is too large and not consistent with the images. Any help on fixing this so that it is even with the rest of the images would be great.
Thanks,
http://petrowest.squarespace.com/
column1: 0 5px 0 0;
column2: 0 5px 0 5px;
column3: 0 5px 0 5px;
column4: 0 0 0 5px;
207*4 = 828px
930 - 828 = 102px (total combined gap between colums)
Since we are only concerning ourselves the 3 gaps on the interior of the page we now do:
102 / 3 = 34px (gap between each column)
now just divide that by two and you get the amount of margin each column should have.
34 / 2 = 17px.
Now because we don't want any extra padding on the left of column1 we want to only add padding to the right. (CSS Shortcut, combining all sides in one statement: margin: top right bottom left)
so your css will be
Worked it in pretty well here, not sure if the anchor tags are really the right thing to do but hope this helps.
http://jsfiddle.net/vyjYx/2/