Relative Content

Tag Archive for htmlcssmedia-queries

CSS Media Query Not Capturing Specific Screen Size (384×730)

I’m working on a responsive design for a project and I’m trying to target specific screen sizes using media queries. However, my current media query doesn’t seem to be capturing a screen size of 384×730 with a device pixel ratio of 2.

Issue with media query and responsive website

When I try to make the website responsive with CSS at a max-width of 400 px, all the elements or all the **body **goes to the left and I can’t put it in the middle of the page, how can I solve this problem?
Thank you for helping.

How to position an element in a specific point of a page responsively without losing my mind over media queries

So, I have a little bit of a weird idea. The background image for the landing of my (work in progress) website is a building I made in blender, and my idea is to put a simple div exactly over the door of the building, which will redirect the user from the landing page to the real homepage upon click.
I have two different versions of this background image, that I switch between via media query: a standard (horizontal) version for devices that have a landscape orientation, and an aptly cut (vertical) version for devices that have a portrait orientation. This means that the position of the door is wildly inconsistent between devices.
Now, the issue is that I’m going insane trying to find a solution to position this “door” div with good responsiveness. Any tricks to avoid using a billion media queries? If not, at least what’s the smartest way to go about those queries? (Using percentages? Using vh and vw? Using pixels?)
Thanks in advance.

Media queries – html and Css beginner college project

Hope you guys can help me figure out what I may have done wrong or different than I should have. I’ve taken a look around SO and I still can’t figure it out. Just to give you a background… I’ve been away from coding for like… 7 years. Had a few personal issues and now I resumed coding.