Streaming live at 10am (PST)

Weird Margin & Percentage Issue

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


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

? Sorry could you elaborate?

You have your paddings set in rem not vw.

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

1 Like

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

Thanks for the spot.