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 2 of 2
Like Tree1Likes
  • 1 Post By sasha_bolcina

Thread: text background not showing

  1. #1
    Junior Member
    Join Date
    Mar 2015
    Posts
    3
    Member #
    46650

    text background not showing

    Hey Guys I am pretty new to CSS

    I am not figuring out why my text is not showing color background

    here is my HTML CODE:

    Code:
    <div id="page-head" class="pad-left">
        <div class="body-container">
        <div class="row">
            <div class="left-col">
                
                    <h1>Join the Game text demo demo</h1>
                
            </div>
    <div class="right-col">
        
            <div class="ph-container">
      
      <button type="button" class="btn btn-primary btn-lg outline">JOIN</button>
    <button type="button" class="btn btn-primary btn-lg POST">POST A JOB</button>
    </div>
    and CSS

    Code:
    #page-head
    {
    display:inline-block;
    margin-left: auto;
    margin-right: auto;
    min-width:940px;
    max-width:1240px;
    width: 1000px;
    height:-100px;
    position:relative;
    bottom:-80px;
    padding: 0 40px;
    padding-top: 0px;
    padding-right: 40px;
    padding-bottom: 0px;
    padding-left: 40px;
    width: 940px; position:absolute; z-index: -1000
    
    }
    #page-head h1 {
    display:inline-block;
    font-size:22px;
    background-color:#DAA838;
    }
    I am attaching my webpage image

    All I want is that the text and those button should be in one line and should have one background color.

    Thanks

    Capture.jpg

  2.  

  3. #2
    Senior Member sasha_bolcina's Avatar
    Join Date
    Sep 2014
    Location
    Serbia
    Posts
    274
    Member #
    40099
    Liked
    47 times
    If: All I want is that the text and those button should be in one line and should have one background color, then:

    Code:
    .row {
         background-color:#DAA838;
         display: table-row;
    }
    .left-col, .right-col {
         display: table-cell;
    }
    You will probably need to adjust H1 or .right-col margins to align them.
    I'm not clear why do you need negative height for #page-head.
    And, you're missing closing div at the end.


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
  •  

Tags for this Thread

All times are GMT -6. The time now is 05:21 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com