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 3 of 3
Like Tree1Likes
  • 1 Post By Vapr_Arts

Thread: Fairly new to HTML/CSS. Need help with first project.

  1. #1
    Junior Member
    Join Date
    Oct 2015
    Posts
    1
    Member #
    52329

    Fairly new to HTML/CSS. Need help with first project.

    Hey guys,

    I'm fairly new to web developping and I need some help with my first project. I'm trying to get my top bar to have an opacity, but I don't want the <h1> to have one. I will be putting my menu in there and i'm assuming its going to effect that as well. What can I do to change that. I'm assuming there is a way but I can't seem to figure it out.

    Can someone give me a hand with this:


    <!doctype html>
    <html>
    <head>
    <title>Web Development</title>

    <meta charset="utf-8" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />

    <style type="text/css">

    body{
    margin:0;
    font-family:
    }

    #container {

    }

    #topbar {
    position:fixed;
    background-color:#FFFFFF;
    width:100%;
    height:100px;
    opacity:0.2;

    }


    #logodiv {
    float:left;
    padding-top:18px;
    padding-left:135px;
    color:black;
    }

    #logodiv h1 {
    margin:0;
    font-size:3em;

    }

    .break {
    clear:both;
    }

    #mtlskyline {
    float:left;

    }


    #mtlskyline img {
    height:650px;
    width:1350px;
    }



    </style>


    </head>

    <body>

    <div id="container">

    <div id="topbar">

    <div id="logodiv">

    <h1>Web Development<h1>

    </div>


    </div>

    <div class="break"></div>

    <div id="mtlskyline">

    <img src="images/mtlskyline.jpg">

    </div>

    </div>


    </body>
    </html>

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    If you put the <h1> outside of your top bar and give it a fixed position with a higher z-index than the top bar, then the h1 wouldn't have an opacity. That would be how I'd solve it.
    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)

  4. #3
    Senior Member Vapr_Arts's Avatar
    Join Date
    Oct 2013
    Location
    California
    Posts
    1,930
    Member #
    37412
    Liked
    544 times
    If its just your background color that needs to be transparent then do something like:

    Code:
    Background: rgba(255, 255, 255, 0.2);
    This will make your background color pure white with an alpha channel set at .2 opacity.


    Sent from my iPhone using Tapatalk
    brandMatt likes this.


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 06:16 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com