Did you remember to give your #header a position of fixed?


#1

Hi , I keep getting the "Did you remember to give your #header a position of fixed. I have done this and run through the forum posts like this , but fail to see where the error is. Help please.


.left{
    background-color:white;
    width: 250px;
    height: 250px;
    margin: 10px;
    border: 3px solid black;
    border-radius:5px;
    display:inline-block;
    
    
  
}

.right{
    background-color:green;
    width: 250px;
    height: 250px;
    margin: 10px;
    border: 3px solid black;
    border-radius:5px;
    display:inline-block;
    
    
}

#header {
    z-index: 1;
    position: fixed;
    background-color:blue;
    color:white;
    font-family:Helvetica;
    border-radius:5px;
}


#footer{
    background-color:red;
    color:yellow;
    font-family:courier;
    border-radius:5px;
}


#2

Hi there,

Your code works for me, assuming you are working on the 4.Fixing your header . Check your html code perhaps? Or try resetting the code completely.


#3

Thx pixelblaster.

Have tried both now and get same result.

Heres my html if that works on your system please?





Crosby kids



Crosby Kids!




Catherine Crosby


Is Awesome!


Born in Epsom


<div class="right">
    <h2>Matthew Paul Crosby</h2>
     <h4>Is the Best!</h4>
     <p>Born in <em>Epsom! </p>
</div>
<div id="footer">
<p>Still living at Bramble Walk       </p>
</div>



#4

Sorry that didnt work, here goes again

<!DOCTYPE html>
<html>
  <head>
    <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
    <title>Crosby kids</title>
  </head>
      <body>
      <div id="header">
      <h1>Crosby Kids!</h1>
      </div>
    <div class="left">
        <h2>Catherine Crosby</h2>
        <h4>Is Awesome!</h4>
        <p>Born in <em>Epsom </p>
    </div>

    <div class="right">
        <h2>Matthew Paul Crosby</h2>
         <h4>Is the Best!</h4>
         <p>Born in <em>Epsom! </p>
    </div>
    <div id="footer">
    <p>Still living at Bramble Walk       </p>
    </div>
  
  </body>
</html>

#5

It does work for me.. The only mistake i can spot is

<em>Epsom part - you did not close the <em>, twice.

If you still encounter the problem after that, I do not know how to help you.. reset you code and start over?


#6

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.