Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

css for resizing a static landing page

Community Beginner ,
Oct 08, 2025 Oct 08, 2025

I'm working on a site that I need to display today. The landing page is one image, for getting viewers to return.

 

On the Dreamweaver page, I attached css that i expected to make the big png resize according to the viewing screen. It didn't work.

 

Is there one particular instruction that should always get used for a case like this?

 

thanks,

Nicky 

134
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 09, 2025 Oct 09, 2025

Having one big image that will stretch to fill a screen can cause distortion in the image depending on the end user's screen resolution. If you can share the page in question that would help us to provide guidance for the best way to go about your desired outcome.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 10, 2025 Oct 10, 2025

The easiest way is probably to check this article: How to create a fullscreen hero image with CSS, and also follow this StackOverflow discussion that covers many related issues 

 

These two links explore different techniques and problems, especially on mobile. It’s better than relying on one single CSS rule.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 14, 2025 Oct 14, 2025
LATEST

CSS:

img .hero {

display:block;

maxium-width: 100%;

height: auto;

}

 

HTML

<img class="hero" src="my_reponsive_image.jpg" alt="some description here">

 

Nancy O'Shea— Product User, Community Expert & Moderator
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines