Skip to main content
Participating Frequently
January 24, 2026
Answered

Help with adding a header / banner to my website

  • January 24, 2026
  • 3 replies
  • 67 views

I am trying to add a banner type image to the header of my website - - 
I was able to insert the image but when to the revised page is uploaded, the 
format of the page has changed - - I would appreciate some help!

    Correct answer L e n a

    The issue does not come from the image itself, but from your header structure. In the CSS, your header has a fixed height, but the banner image inside the header is taller than that. So, this causes the image to overflow the header and the layout below is no longer positioned correctly.

    .header {
        background: #ADB96E;
        height: 110px; /* Removing the fixed height allows the header to adapt to the image size and the page displays normally again */
    }


    You may also consider simplifying and correcting the IMG tag. Fixed width and height attributes can limit flexibility when the layout changes.
    Then, having a meaningful ALT attribute is important. It is also good practice to avoid spaces in file names and to use lowercase names consistently.
    This means the image file and folders should be renamed in the directory structure, not only rewritten in the HTML.

    <img src="../images/TUG%20-%20WEBPAGE%20GRAPHICS/TUG%20WEBPAGE%20HEADER.jpg" width="960" height="176" alt=""/>
    
    replaced by
    
    <img src="../images/tug_webpage_graphics/tug_webpage_header.jpg" alt="Site header">
    


    This allows the image to adapt naturally to the header instead of forcing fixed dimensions.

     

    Anyway, your problem was mainly related to the fixed header height combined with the layout structure, not to the banner image itself.

    3 replies

    L e n aCommunity ExpertCorrect answer
    Community Expert
    January 24, 2026

    The issue does not come from the image itself, but from your header structure. In the CSS, your header has a fixed height, but the banner image inside the header is taller than that. So, this causes the image to overflow the header and the layout below is no longer positioned correctly.

    .header {
        background: #ADB96E;
        height: 110px; /* Removing the fixed height allows the header to adapt to the image size and the page displays normally again */
    }


    You may also consider simplifying and correcting the IMG tag. Fixed width and height attributes can limit flexibility when the layout changes.
    Then, having a meaningful ALT attribute is important. It is also good practice to avoid spaces in file names and to use lowercase names consistently.
    This means the image file and folders should be renamed in the directory structure, not only rewritten in the HTML.

    <img src="../images/TUG%20-%20WEBPAGE%20GRAPHICS/TUG%20WEBPAGE%20HEADER.jpg" width="960" height="176" alt=""/>
    
    replaced by
    
    <img src="../images/tug_webpage_graphics/tug_webpage_header.jpg" alt="Site header">
    


    This allows the image to adapt naturally to the header instead of forcing fixed dimensions.

     

    Anyway, your problem was mainly related to the fixed header height combined with the layout structure, not to the banner image itself.

    Nancy OShea
    Community Expert
    Community Expert
    January 24, 2026

    Most layout issues are caused by code errors from orphaned tags or careless use of the Backspace key. 

    Go to Window ⇒ Results ⇒ Validation. 

    Check your current document and fix reported errors.

     

    If you still need help, post the URL here to your problem page online.

     

    Nancy O'Shea— Product User & Community Expert
    Participating Frequently
    January 24, 2026

    Thank you Nancy - - you have helped me - - numerous times! My webpage address: https://www.upstairsartgallery.com/

    I use a template for all the related pages. As noted, I am trying to add a banner / pic to the header of the page.
    Here is a link to a revised page  - showing how the heade is not "fitting" properly  - 
    https://www.upstairsartgallery.com/Artist_Pages/margie_whittington.htm

     


    I seem to be having trouble uploading files - - Thanks for any help you may offer - - Mac

    Community Expert
    January 24, 2026

    It's difficult to say exactly what is going on with your page based on your feedback. Would you be able to share a link to the page in question or screenshots to help show what you mean by the format has changed? Without seeing any code or images, I can only assume that your header might not be fitting into your layout and could be causing elements to move out of place, but exactly what your fix will be is specific to your code and page.