Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1007993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:42:06+00:00 2026-05-16T08:42:06+00:00

How can I make the header fixed and the content scroll under the header?

  • 0

How can I make the header fixed and the content scroll “under” the header? Also how can I get the CSS Play button to be above the line and look decent?

index.html:

<!DOCTYPE html>
<html>
<head>
    <title>lingo records</title>

    <meta charset="utf-8">
    <link rel="icon" href="/favicon.png">
    <link rel="author" href="http://forksforoatmeal.com">
    <link rel="stylesheet" href="/assets/css/lingo.css">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
    <script src="/assets/js/jquery.jplayer.min.js"></script>
    <script src="/assets/js/lingo.js"></script>
</head>
<body>
    <div id="header">
        <h1 class="header">lingo records</h1>
        <ul id="navigation">
            <li><a href="#home">home</a></li>
            <li><a href="#about">about</a></li>
            <li><a href="#samples">samples</a></li>
            <li><a href="#contact">contact</a></li>
        </ul>
        <div id="music_player">
            <span id="pp"></span>
            <span id="song"></span>
        </div>
    </div>
    <div id="content">
        <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
    </div>
    <div class="clear">&nbsp;</div>
    <div id="footer">
        &copy; 2010 lingo records. <a href="http://forksforoatmeal.com">Josh Brown</a>
    </div>
    </body> 
    </html>

lingo.css:

/* Yahoo Style Reset Code licensed under the BSD License: http://developer.yahoo.com/yui/license.html version: 2.8.1 */
html{color:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,button,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var,optgroup{font-style:inherit;font-weight:inherit;}del,ins{text-decoration:none;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym{border:0;font-variant:normal;}sup{vertical-align:baseline;}sub{vertical-align:baseline;}legend{color:#000;}input,button,textarea,select,optgroup,option{font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;}input,button,textarea,select{*font-size:100%;}


body {
/*  background-color: #63B7D4;*/
    background-color: #fff;
    margin: 30px;
    font-family: 'Philosopher', sans-serif;
    font-size: 14px;
    color: #4F5155;
}

a {
    color: #475152;
    background-color: transparent;
    font-weight: normal;
}


h1.header {
    font-family: 'Philosopher', sans-serif;
    font-size: 70px;
    letter-spacing: -4px;
}

#header {
    position: static;
    border-bottom: 1px solid #D0D0D0;
}

#header #navigation a {
    font-family: 'Philosopher', sans-serif;
    font-size: 22px;
    text-decoration: none;
}
ul#navigation > li {
    display: inline;
    list-style-type: none;
    margin-right: 15px;
}

#header #navigation a:hover {
    text-decoration: underline;
}

#header #navigation a:last-child {
    margin-right: 0px;
}

#content {
    margin-top: 60px;
    font-size: 20px;
}


#footer {
    position: fixed;
    bottom: 0;
    right: 0;
    margin-bottom: 20px;
    margin-right: 20px;
    font-size: 12px;
}


/* Music Player */
#music_player {
    float:right;
    margin-right: 30px;
    margin-bottom: 5px;
    width: 250px;
}

.play {
    display:block;
    width:0;
    height:0;
    border-style:solid;
    border-width: 8px 0px 8px 16px;
    border-color:transparent transparent transparent #4F5155;

}
.pause{
    display:block;
    width:16px;
    height:16px;
    border-left:32px double #4F5155;
}

@font-face {
    font-family: Philosopher;
    src: url(/assets/fonts/Philosopher.otf);
    font-weight:400;
}

Thanks in advance for your help!
-Josh

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T08:42:07+00:00Added an answer on May 16, 2026 at 8:42 am

    You can use position: fixed for it to stay in place as the user scrolls, although you’d probably need to apply a (semi-transparent) background for the header contents to be visible when the user scrolls. The styles you need to add are:

    #header {
      position: fixed;
      width: 100%; /* Or whatever width you need it to be */
      background-color: rgba(255, 255, 255, 0.7); /* Use semi-transparent png for IE support */
      top: 10px;
    }
    
    #content {
      margin-top: 160px; /* To push content off the top of the page */
    }
    

    As for the song player, you need to provide either a link to the page you are working on, or some sort of sample, as without the Javascript it is impossible to see what sort of markup is generated and what style is necessary for it to ‘look decent’.

    Edit: About that music player button… The method you’re using looks to me to be a bit of a hack. I mean, you have to be really desperate to need to use border to create the play triangle, right? You’re probably better off just using background-image instead, with something like

    #pp {
      background: url('path/to/image.png') no-repeat scroll left top;
      padding-left: 10px;
    }
    

    for the play button.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can i make the height of the row and the header fixed when
I'm trying to make a CSS fixed width, two column, header and footer layout.
How can I make the header(Location: /path); to only redirect once? Currenlty I have
How can I make such layout? Header should not scrolls and should be always
I've been looking at ways to make a table have a fixed header especially
I'm trying to make a web page with a fixed header and a scrollable
Hi I have a problem with my css for some reason I can't get
How can I make the table header appear on the left side of the
Header, footer and sidebars have fixed position. In the center a content area with
For example,I want to make a layout like this: The 'header' can have a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.