-1

I created a landing page for the website www.foscaintepidario.it But I want the image on it to be centered, and remain centered, also when the browser-view is changed. Changed in the perspective of size, but also the switch from landscape to portrait and the other way around. In het HTML/CSS I currently make a distinction between the portrait and landscape version, they both have their own image.

Hope you can help me.

Leon N
  • 103
  • 2
  • 14
  • You need to show us what have you tried in order to fix this problem. You can't expect us to post a full answer from scratch. – Lamar Aug 28 '17 at 09:23
  • I already tried differnet solutions in a table, also with a background, but nothing fits.... – Leon N Aug 28 '17 at 13:15

2 Answers2

0

you can use css background elements to have a clean view.

background-image: url(url to image);
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
Mahdi P.
  • 167
  • 1
  • 5
  • I implemented this solution earlier, but the image remains in the top-area, and I can see only half of it. – Leon N Aug 28 '17 at 13:46
  • I recreated that solution, so perhaps that will be helpfull. please see this link: http://www.foscaintepidario.it/index-background.html – Leon N Aug 28 '17 at 13:47
0

I finally solved it. The solution with the background-image works fine. The only thing I had to add was the height: 100vh parameter!

Thnx for your support

Leon N
  • 103
  • 2
  • 14