ul#grid  {
display: block;
width: 100%;
height: auto;
list-style: none; 
float: left;
margin-left: 0;
}
ul#grid  li {
display: inline-block;
float: left;
height: auto;
width: 100%;
}
ul#grid  li a {
display: block;
height: 280px;
border: 2px solid #fff;
overflow: hidden;
}
ul#grid  li a img {
width: 100%;

}
ul#grid  li#u1 a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=558) 0 0 no-repeat #fff;
}
ul#grid  li#u2 a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=475) 0 0 no-repeat #fff;
}
ul#grid  li#u3 a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=498) 0 0 no-repeat #fff;
}
ul#grid  li#u4 a {
background: url(../images/leis_uslugi/u4.png) 0 0 no-repeat #fff;
}
ul#grid  li#u5 a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=445) 0 0 no-repeat #fff;
}
ul#grid  li#u6 a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=597) 0 0 no-repeat #fff;
}
ul#grid  li#svad_salon_ufa a,ul#grid  li#sanuz_cvet a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=630) 0 0 no-repeat #fff;
}
ul#grid  li#sv_salon_ufa_pr_okt a,ul#grid  li#dets_cvet a  {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=634) 0 0 no-repeat #fff;
}
ul#grid  li#kuh_per a, ul#grid  li#zav_mik a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=535) 0 0 no-repeat #fff;
}
ul#grid  li#mag_od a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=589) 0 0 no-repeat #fff;
}
ul#grid  li#fasad a {
background: url(../images/leis_uslugi/fasad.jpg) 0 0 no-repeat #fff;
}
ul#grid  li#mend_chert a, ul#grid  li#bar1 a {
background: url(https://design-leys.ru/component/joomgallery/image?view=image&format=raw&type=img&id=610) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#dacha_ufa_viz a {
background: url(../images/leis_uslugi/dacha-viz.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#dacha_ufa_foto a {
background: url(../images/leis_uslugi/dacha-foto.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#nkv_uva_viz a {
background: url(../images/leis_uslugi/nk_ufa_viz.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#det4g a {
background: url(../images/leis_uslugi/det4g.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#matur a {
background: url(../images/leis_uslugi/matur.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#rina a {
background: url(../images/leis_uslugi/rq4.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#smidtovo a {
background: url(../images/leis_uslugi/smidtovo.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#fasad2020 a {
background: url(../images/leis_uslugi/fasad2020.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#zorge2020 a {
background: url(../images/leis_uslugi/kv_zorge2020.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#aysk2020 a {
background: url(../images/leis_uslugi/aysk2020.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#pekinskaya a {
background: url(../images/leis_uslugi/pekinskaya.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li#kvst2020 a {
background: url(../images/leis_uslugi/kvst2020.jpg) 0 0 no-repeat #fff;
background-size: cover;
}
ul#grid  li a #sub  {
width: 100%;
display: block; 
color: #fff;
/* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#000000+21,000000+50,000000+80&0+0,0.8+33,1+38,1+58,0.8+65,0+100 */
background: -moz-linear-gradient(left, rgba(13,43,31,0) 0%, rgba(13,43,31,0.51) 21%, rgba(13,43,31,0.8) 33%, rgba(13,43,31,1) 38%, rgba(13,43,31,1) 50%, rgba(13,43,31,1) 58%, rgba(13,43,31,0.8) 65%, rgba(13,43,31,0.46) 80%, rgba(13,43,31,0) 100%); /* FF3.6-15 */
background: -webkit-linear-gradient(left, rgba(13,43,31,0) 0%,rgba(13,43,31,0.51) 21%,rgba(13,43,31,0.8) 33%,rgba(13,43,31,1) 38%,rgba(13,43,31,1) 50%,rgba(13,43,31,1) 58%,rgba(13,43,31,0.8) 65%,rgba(13,43,31,0.46) 80%,rgba(13,43,31,0) 100%); /* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to right, rgba(13,43,31,0) 0%,rgba(13,43,31,0.51) 21%,rgba(13,43,31,0.8) 33%,rgba(13,43,31,1) 38%,rgba(13,43,31,1) 50%,rgba(13,43,31,1) 58%,rgba(13,43,31,0.8) 65%,rgba(13,43,31,0.46) 80%,rgba(13,43,31,0) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#00000000',GradientType=1 ); /* IE6-9 */
z-index: 1;
padding: 15px 0 15px 0;
text-align: center;
text-indent: 0px;
opacity: 0.99;
text-decoration: underline;
margin-top: 45%;
}
ul#grid  li a:hover #sub {
font-weight: bold;
}
#odin{
margin-top: -40px;
}
#dva{
margin-top: -20px;
}
.forcol {
display: inline-block;
float: left;
width: 33%;
height: auto;
}