The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Image display too large, diverging from tutorial causes image display problem
TonyH
post Nov 20 2019, 08:28 AM
Post #1


Newbie
*

Group: Members
Posts: 12
Joined: 20-November 19
Member No.: 27,045



I'm following a Brad Traversy beginner tutorial on YouTube. He recommends that users diverge from the original layout to produce personalized Web Pages, so I did.

Under the header in his tutorial Brad has a "showcase.jpg" 1920 X 1280px image which is governed by code that shows only a small proportion of the image. He then goes on to move this partially hidden image around to focus on one central area of it. This is great for his purposes.

I'm trying to replace this with an image "mainPic.png" 5692 x3200px that will show in it's entirety.

Both the original image and my replacement image look massively too large for their allocated space, even when I scale down my replacement image to 1897 x 1066px.

Here's what I hope is the relevant HTML code:

CODE
<section id="showcase">
    <div class="container">
      <h1>My wannabee web page</h1>
      <p> I hope you can help</p>
    </div>
  </section>


And here is the CSS code:

CODE
#showcase{
  min-height: 400px;
  background:url('../img/showcase-01.png')no-repeat;
}


I hope the above makes enough sense for someone to suggest a method for getting my image to show fully.

Regards
and thanks for reading.

TonyH
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
TonyH   Image display too large   Nov 20 2019, 08:28 AM
pandy   Well, what is the allocated space? Does #showcase ...   Nov 20 2019, 08:42 AM
pandy   Assuming the box can expand this can be hard to do...   Nov 20 2019, 08:58 AM
TonyH   It only has a min-height. It fills the area in bo...   Nov 20 2019, 08:51 AM
TonyH   Thanks Pandy, I'll work my way through that to...   Nov 20 2019, 10:16 AM
pandy   So that could be an option? I think it may be the ...   Nov 20 2019, 10:19 AM
TonyH   Thanks Pandy, Your change in the code makes the i...   Nov 20 2019, 10:47 AM
pandy   I think maybe you miss the point. The full width o...   Nov 20 2019, 11:05 AM
TonyH   Thanks, in my bumbling way I made the image much s...   Nov 20 2019, 12:01 PM
pandy   It should resize, both smaller and larger. Mine do...   Nov 20 2019, 12:41 PM
TonyH   You are way more advanced than I am. But you give ...   Nov 20 2019, 01:12 PM
pandy   There are other ways. Problem is I don't know ...   Nov 20 2019, 06:09 PM
TonyH   I'm thinking of moving the text out and downwa...   Nov 21 2019, 03:41 AM
pandy   I'm thinking of moving the text out and downw...   Nov 21 2019, 07:07 AM
TonyH   I chopped and changed a few bits of the code and r...   Nov 21 2019, 08:34 AM
pandy   OK, so it is for a header. :P   Nov 21 2019, 09:05 AM
pandy   If I may suggest... Make the image lower and a lo...   Nov 21 2019, 09:17 AM
TonyH   Thanks, I'll get my daughter to rearrange the ...   Nov 21 2019, 10:12 AM
pandy   You need a little more than what I gave you I thin...   Nov 21 2019, 12:31 PM


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 20th April 2024 - 09:31 AM