How to move elements inside a container? (vague, I know)
https://github.com/callum-laing/shopping-site
Apologies I tried putting this into codesandbox but it spazzed out, and codepen didn't want to do it either.
I'm trying to find out how I move the positioning of the 2 elements on the side (CDL, and the shopping cart image). I tried padding-left and padding-right on the header, but that also moves the links in the middle, is there a better alternative here that doesn't disturb spacing of others?
CSS:
4 Replies
UPDATE!
adding this seems to have done the trick, but I'm still curious if there are other solutions..
Added padding to the container for only the left/right sides.
you can instead do
padding-inline:20px;
so you dont need to set padding on top and bottom to 0 pixels
padding-inline is for left and right, it's called a logical property, kevin have a video about it.This is what I'm looking for, thanks! (Ill check out the video too!)
No problem 🙂