Streaming live at 10am (PST)

Weird Margin & Percentage Issue


#1

So after playing around I built a 16 col grid using SVG and VW to calculate divisions. I calculated that 16 / 100 vw would be 6.25vw.

I have a div and set a margin of 6.25vw left and it lines up perfectly however when I use padding it doesn’t I know that heights on margins are calculated differently to padding, but widths are not.

I have duplicated the section, when you preview you will see the issue.

Anyone have any idea what the cause could be?

Preview Link



#2

You really have to have another look at your units :wink:


#3

? Sorry could you elaborate?


#4

You have your paddings set in rem not vw.


#5

OMG I’m going to go put myself in the closet and think about what I just did. How shameful.


#6

We all have our derpy moments, mate! :smiley:


#7

Thanks for the spot.