So, i'm a beginner html/css coder and trying to make a simple site.
Now I have a neat background that behaves perfectly.
But when adding a logo at the top center it looks perfect on the current window size. But when I resize the window, half of the logo is cut off.
My CSS style:
The issue is these two lines of code:
height: 200px; width:971px;
When you use "px" it's a fixed amount of pixels which means it doesn't change based on screen size. If you use "em" instead then the image will change based on the screen size of the visitor.
Here are two quick references that I hope may be helpful.
To fix it you might do something like this:
height: 100em; width:486em;
(Don't use my exact values of course.)
EDIT: Alternatively it may be good to use a percentage like this:
width: 971px; max-width:100%
EDIT 2: It was pointed out to me that you'd probably want to include this line as well: