Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5

Thread: Header Help

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Location
    United Kingdom
    Posts
    5
    Member #
    37343

    Header Help

    Apologies in advance, as this is probably a very noobish, and easy question to know. But I have been playing around with things for the past 2 hours trying to figure it out, to no avail. I have started a website for my american football team, and want the header to have a background color, but i cant for the life of me figure out what im doing wrong.

    HTML Code:
    <!DOCTYPE html>
    <html lang="en">
        <head>
            <meta charset="UTF-8">
            <link rel="stylesheet" type="text/css" href="styles/main.css">
            <title>Wigan Warhawks | Wigans Only American Football Team</title>
        </head>
        <body>
            <header>
                <a class="main-banner" href ="index.html" >
                    <img id="logo-left" src="img/Wigan%20Warhawks%20Logo.png" alt="Wigan Warhawks Logo">
                    <!--<img id= "main-logo" src="" alt="">-->
                    <h1 class="top-title">Warhawks</h1>
                    <img id="logo-right" src="img/Wigan%20Warhawks%20Logo.png" alt="Wigan Warhawks Logo">
                </a>
    
    
            </header>
    
        </body>
    </html>
    Code:
    /***************************
            Heading
    ***************************/
    
    body{background: #ccc; padding: 0; margin: 0;}
    header {background-color: darkblue; padding: 0; margin: 0;}
    #logo-left {float: left; height: 150px; width: 150px; padding: 0; margin: 0;}
    #logo-right {float: right; height: 150px; width: 150px;}
    .main-banner {max-width: 100%;}
    .top-title {
        float: left;
        margin: 20px auto 0;
        padding: 0;
        font-size: 3.25rem;
        font-weight: bold;
        color: midnightblue;
        text-align: center;
    }
    h1 {margin: 0; padding: 0 0 0; text-align: center;}
    As you can see my aim is to get it looking like this.
    banner example.jpg

    But all im getting is this
    mybanneer.jpg

    any help would be greatly appreciated. Thanks..

  2.  

  3. #2
    Junior Member cvincent's Avatar
    Join Date
    Aug 2015
    Posts
    9
    Member #
    51573
    Liked
    2 times
    Can you post a link to the site? At first glance, it looks like it should work, but obviously something is wrong.

  4. #3
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    You don't need to float the header as such. Just have it after the two logos.

    You can also get away without floating the logos at all. See here: Multiple Backgrounds with CSS3 - CSS3 . Info . You will, however, have to do some hacky stuff for older versions of IE (8 and below) if you care about them.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  5. #4
    Junior Member
    Join Date
    Oct 2013
    Location
    United Kingdom
    Posts
    5
    Member #
    37343
    Quote Originally Posted by cvincent View Post
    Can you post a link to the site? At first glance, it looks like it should work, but obviously something is wrong.
    Its locally hosted, so not able to. But yeah, i presumed it should work also.

    Quote Originally Posted by TheGAME1264 View Post
    You don't need to float the header as such. Just have it after the two logos.

    You can also get away without floating the logos at all. See here: Multiple Backgrounds with CSS3 - CSS3 . Info . You will, however, have to do some hacky stuff for older versions of IE (8 and below) if you care about them.
    Ill check it out. Thanks. My thought process was, to float everything to the left, so it sits nicely, ideally i wanted the h1 to be a picture, as my choice of font isnt a web one SF Collegiate.

  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Handpicked free fonts for graphic designers with commercial-use licenses. | Font Squirrel

    You may be able to make it a web font using the Font Generator tool there. I'm not sure if you're legally allowed to do that with the SF fonts, though...it's font specific.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:03 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com