I’m currently on the first front-end project and I’m having problems making my text align properly with an image at higher resolutions. Here is the codepen project: https://codepen.io/DevNeek/full/EvpbqQ/
The text aligns properly when you reduce the browser size, but at full size the bio doesn’t align with the image.
I sort of solved it, the max-width was messing with alignment, I’m not sure why.
Ok, so my element was offset because of the max-width (still not sure why), but doing a “margin: 0 auto;” forced my element to be centered in relation to the parent elements, then I just put that element inside a div and added back the left and right margins, now it is completely fixed
Glad you figured out your problem.
document.getElementsByTagName("h1").style.fontSize = "80px";
It would be much better to do this in CSS like:
I don’t remember putting any js yet… weird.