uni-web
Well-Known Member
Дори не знам дали точно така да го нареча, но тъй-като бях попитан за кода който съм правил за сайтовете ми, реших да ви го споделя, и който иска и може да се оправя от тук натам.
html:
css:
jquery:
html:
PHP:
<div id='slidesharing'>
<div>
/*Бутон за социалка, и другите по същия начин*/
</div>
</div>
css:
PHP:
#slidesharing{
position: fixed;
left: 5px;
padding: 5px;
height: 380px;
top: 230px;
bottom: 140px;
border-radius: 5px 5px 5px 5px;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
border: 1px solid #CCCCCC;
background-color: #ffffff;
box-shadow: 1px 0 15px rgba(0, 0, 0, 0.2);
text-align: center;
z-index: 2;
}
jquery:
PHP:
$(document).ready(function(){
var windowWidth = document.documentElement.clientWidth;
var thestyle = windowWidth-1175;
var nthestyle = thestyle/2;
$("#slidesharing").css({"left":nthestyle});
//alert(thestyle);
});
$(window).resize(function(){
var windowWidth = document.documentElement.clientWidth;
var thestyle = windowWidth-1175;
var nthestyle = thestyle/2;
$("#slidesharing").css({"left":nthestyle});
//alert(thestyle);
});