Skip to content
Advertisement

Why is my html, css, and javascript content shifting to the right on my phone (different platforms)?

Phone Content

enter image description here

The image I have attached is a screenshot of how my webpage https://www.taniaswebpages.com looks. Everything is shifted to the right.

When I work on this page in Brackets, my content is kind of centred but mostly towards the left, and the 2 trees are on the right side. I am doing a website challenge for 180 days, and I am struggling. Hoping someone can help me, since I am new at this coding stuff. The content starts stacking in a weird way when I view the webpage on my phone.

this is my html:

JavaScript

this is my css:

JavaScript

Advertisement

Answer

Change your CSS code for .image -like this:

JavaScript

And, on small-screen devices, you can use this code (see below) to prevent images from going above the site content.

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement