Making a square responsive grid with bootstrap and php
Something like this: the other one must be using javascript
css
.dummy {
margin-top: 100%;
}
.row {
display:flex;
flex-wrap:wrap;
justify-content:center;
}
.item-item {
flex:0 0 277px;
margin: 15px 0 0 1%;
text-align: center;
padding-top: calc(50% - 30px);
border: solid black 5px;
}
https://jsfiddle.net/3wym5nhw/4/
how to show the result in thumbnail gridview like pininterest using bootstrap
here you go
HTML
<div class="row">
<div class="col-lg-12 gallery">
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
<img src="http://placekitten.com/200/300" />
</div>
</div>
CSS
.gallery img {
padding: 10px;
}
jsfiddle: http://jsfiddle.net/N7mYY/
Website Thumbnail (Bootstrap)
Put your image as container background
CSS:
.Thumb-Box{
display:inline-block;
width: [your width here];
height: [your height here];
}
.Thumb-Box a{
display:inline-block;
height:100%;
width:100%;
padding:0;
margin:0;
}
HTML:
<div class="Thumb-Box" style="background: url('url');background-position: 0px 0px;"><a href="link here"> </a></div>
"0px 0px
" stands for what piece of the thumbnail should be seen
ex: -10px
from left
and -10px
from top
Related Topics
Floated Image to Left of a Ul Is Ignoring Margin/Padding
What Is The Meaning of an Ampersand in Less Selectors
How to Make a Div Full Screen and Scrollable
CSS Firefox - How to Deactivate The Dotted Border ( Firefox Click Indicator )
How to Center Text Inside: Before Pseudo Element
Reset Style Sheet with Twitter Bootstrap
Is There a CSS Selector to Match a Option Value of The Select Tag
How to Style Nested Elements in React with Styled-Components
CSS Selector for Custom Qt Class
CSSmin Not Correctly Handling @Import
CSS Selector to Check That Attribute Does Not Contain Both Values
How to Change The Color of Bootstrap Checkbox
Combining Ie6 and Ie7 CSS Hacks in Same Stylesheet
How to Rotate a Font Icon 45 Degrees