Please can someone help me fix this code? Its doesn't seem to make the div you want to stick to the top of the page: the code is shown below.

I need help, what is the problem with the code below:

<! DOCTYPE html >

< html >

< head >

< title > < / title >

< style >

*{

margin: 0;

padding: 0;

}

{#sticky}

Width: 600px;

background-color: #000;

color: #fff;

do-size: 2em;

border-radius: 0.5ex;

padding-top: 10px;

padding-bottom: 10px;

padding-left: 3px;

}

{#sticky.stick}

position: fixed;

top: 0;

z index: 10000;

}

{#sticky-anchor}

height: 0;

}

{#wrapper}

Width: 600px;

Auto margin: 0;

padding: 0;

}

#header {}

Width: 600px;

height: 140px;

Auto margin: 0;

}

#content {}

Display: block;

height: 800px;

Width: 600px;

background-color: pink;

}

< / style >

< / head >

< body >

< script >

function sticky_relocate() {}

var window_top = $(window) .scrollTop ();

var div_top is $('#sticky-anchor').offset () .top;.

If (window_top > div_top) {}

$('#sticky').addClass ('stick');

} else {}

$('#sticky').removeClass ('stick');

}

}

{$(function()}

$(window) .scroll (sticky_relocate);

sticky_relocate();

});

< /script >

< div id = 'wrapper' >

< div id = "header" > < welcome h1 > < / h1 > < / div >

< div id = "post-it-anchor" > < / div >

< div id = "sticky" > it will stay at the top of the page < / div >

< div id = "content" > < / div >

< / div >

< / body >

< / html >

Nothing wrong (other than a few problems regarding coding practices). You simply need to link to the top of the jQuery library.

Tags: Dreamweaver

Similar Questions

Maybe you are looking for

  • Why I can't download apps or update

    Why can not download or update all apps?

  • Increase video memory on Satellite A300 - 20H

    Hello world.I need to increase the video memory, but I have not found where I can do. (It was written that on this model can be up to 1 GB of video memory (3.25 full, but now because of simple calcularion is about 128.)) There is no option in the BIO

  • Live update engine

    I get a message saying that live com updated engine module has stopped working. What is and how to repair or fix this problem

  • Migrating Sharepoint 3.0 to Sharepoint Foundation 2013?

    I am currently using sharepoint services 3.0.  I use sharepoint foundations 2013.  Is it possible to migrate all SharePoint services 3.0 to sharepoint Foundation 2013? Gerald

  • How can I save the changes on viewing options?

    Whenever I use Acrobat Reader DC I need to change the options of visualization of 'exposure of individual page' to 'Enable scrolling. How can I save this change on viewing options?And another question: when I open the Acrobat Reader DC, a tab appears