На моей странице у меня есть div div и под ним div, который я сделал липким, используя плагин jquery с липким набором.jquery sticky div gap
Липкий div должен быть жестким против знака div, но как-то 1 пиксель ползет, что означает, что при прокрутке текста вы получаете довольно эффект откладывания.
Я сделал jsfiddle здесь и был бы очень благодарен за любой совет. Я пробовал другие липкие плагины для jquery, и все они, похоже, имеют такую же проблему.
HTML:
<div id="header">
<h2>Main Banner</h2>
</div>
<div id="wrapper">
<div id="left">
<h2>Menu</h2>
</div>
<div id="right">
<table id="tableHeader" width="100%" class="myTable" cellspacing="0">
<tr>
<td bgcolor="#FFFFCC"><h2>Inner Banner</h2><br>aaa</td>
</tr>
</table>
<br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
<br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
<br><br>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's
standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a
type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting,
remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing
Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of
Lorem Ipsum.
</div>
</div>
Вы можете сделать 'height: 81px;' для 'div # header'? – Banzay
doh !!! да, это его большое спасибо. –
Я положил это как ответ – Banzay