http://pinterest.com/ have a intresting structures of blocks. How I can make the same?
Now I have this code:
li {
float:left;
margin-right:10px;
}
And I get this result:
http://imageshack.us/photo/my-images/339/49022374.png
But, I need this:
http://imageshack.us/photo/my-images/197/86816998.png
Why involving JS?
All you need is a number of floated column divs with inner divs
here is a simple fiddle
HTML
<div class="col">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velitmentum vestibulum. Aenean faucibus nunc sed quam vehicula laoreet. Aliquam
</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagittis ligula, et sagitti</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagitti
</div>
</div>
<div class="col">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagittis ligula, et sagittis nibh nulla eget purus. Nunc nec tellus massa. Cras sit amet tortor nec libero condimentum vestibulum. Aenean faucibus nunc sed quam vehicula laoreet. Aliquam
</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagittis ligula, et sagitti</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagittis ligula, et sagittis nibh nulla eget purus. Nunc nec tellus massa. Cras sit amet tortor nec libero condimentum vestibulum. Aenean faucibus nunc sed quam vehicula laoreet. Aliquam
</div>
</div>
<div class="col">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante
</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagittis ligula, et sagitti</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagittis l
</div>
</div>
<div class="col">
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ant
</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagittis ligula, et sagitti</div>
<div>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam porta arcu quis risus ultricies viverra ac at velit. Morbi congue, tellus a faucibus euismod, velit ante sagittis li
</div>
</div>
CSS
.col {
width:20%;
float:left;
}
.col div {
margin:10px;
padding:5px;
border:1px solid black;
}
Related
Is it possible to replicate the scroll to top button on my staging website (https://staging2.nomadandinlove.com/) just by using CSS and HTML?
Yes, you can use the scroll-behavior property, setting it to smooth. Although be aware not all browsers support this property. Here you can see the latest stats on this: https://caniuse.com/#search=scroll-behavior
Also you will have no control over the animation. So if you need a solution that will work in most situations and that will give you more fine grained control on the execution of the scroll, use JavaScript.
html { scroll-behavior: smooth; }
body { width: 30%; }
<a id="page-top">Top of the page</a>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
Scroll to top
Here is an answer close to #Terminator-Barbapapa, but if you don't want to create another element, just add ID to the body and link your button to the body ID as below:
html { scroll-behavior: smooth; }
body { width: 30%; }
<body id="body-id">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur ac interdum lectus. Nulla feugiat et urna at ullamcorper. Nullam lectus elit, eleifend nec elit sit amet, tempus iaculis nibh. Sed non nisl tellus. Ut vitae rutrum metus, vel varius nunc. Nulla a mattis dolor. Quisque vestibulum quis ante sit amet blandit.</p>
Back to top
</body>
I guess you are trying to attach a button in the end of your webpage which (onlclick) makes the user go back on the top..If so the code will be as follows-
*{
margin:0;
padding:0;
}
#to-here{
height: 120vh;
font-size: 1.5em;
}
<html>
<body>
<div id="to-here">Want to come here ? Scroll Down then click the link..</div>
<a href="#to-here">
Goto Top
</a>
</body>
</html>
So basically i am using anchor tag "" to link to a specific point in web page. You can customize this anchor tag using CSS to make it look much more like a button. For more information of linking you can search for "Linking within a web page".
Why do inline-block elements not align on vertical top itself? If I have same content in all the blocks it is good, but Ii reduce content in one, it loses it alignment. In the code - there are four divs with class para1 & css defined. 2nd, 3rd & 4th div are ok, but 1st is moved below, as content is less in it. I can get it ok with position or using float but need to understand why it is like this?
.para1 {
width: 24%;
height: 200px;
border: 2px solid red;
display: inline-block;
}
<div>
<div class="para1">
<p>Cras fringilla malesuada sem, et aliquam ligula tincidunt a.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor
luctus.</p>
</div>
<div class="para1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus. Cras fringilla malesuada sem, et aliquam ligula
tincidunt a.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus.</p>
</div>
<div class="para1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus. Cras fringilla malesuada sem, et aliquam ligula
tincidunt a.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus.</p>
</div>
<div class="para1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus. Cras fringilla malesuada sem, et aliquam ligula
tincidunt a.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus.</p>
</div>
</div>
Because the default vertical alignment of inline elements is baseline. Change it to something like middle or top and they align as I think you'd want them to.
.para1 {
width: 24%;
height: 200px;
border: 2px solid red;
display: inline-block;
vertical-align: top;
}
<div>
<div class="para1">
<p>Cras fringilla malesuada sem, et aliquam ligula tincidunt a.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor
luctus.
</p>
</div>
<div class="para1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus. Cras fringilla malesuada sem, et aliquam ligula
tincidunt a.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus.</p>
</div>
<div class="para1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus. Cras fringilla malesuada sem, et aliquam ligula
tincidunt a.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus.</p>
</div>
<div class="para1">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus. Cras fringilla malesuada sem, et aliquam ligula
tincidunt a.Lorem ipsum dolor sit amet, consectetur adipiscing elit. Fusce cursus, est ut mattis blandit, magna leo iaculis lacus, vel volutpat eros sem at velit. Curabitur sit amet massa et sapien porttitor luctus.</p>
</div>
</div>
screenshot of the problem
So I've have this irritating problem when smaller div doesn't follow the taller div. Is there a solution for this problem?
.right { float:right;}
.left { float: left; }
.row:after {
content:"";
display:block;
clear:both;
}
<div class="row">
<div class=" col-3 col-m-12 right">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id facilisis augue, vel dictum velit. Nam rutrum, sem in finibus congue, neque sapien volutpat libero, ut pulvinar dui dolor non elit. Aliquam et rutrum orci, ut aliquet lorem. Maecenas eget nulla quam. Nullam sit amet ullamcorper augue.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id facilisis augue, vel dictum velit. Nam rutrum, sem in finibus congue, neque sapien volutpat libero, ut pulvinar dui dolor non elit. Aliquam et rutrum orci, ut aliquet lorem. Maecenas eget nulla quam. Nullam sit amet ullamcorper augue.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id facilisis augue, vel dictum velit. Nam rutrum, sem in finibus congue, neque sapien volutpat libero, ut pulvinar dui dolor non elit. Aliquam et rutrum orci, ut aliquet lorem. Maecenas eget nulla quam. Nullam sit amet ullamcorper augue.
</div>
<div class="col-9 col-m-12 left">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id facilisis augue, vel dictum velit. Nam rutrum, sem in finibus congue, neque sapien volutpat libero, ut pulvinar dui dolor non elit. Aliquam et rutrum orci, ut aliquet lorem. Maecenas eget nulla quam. Nullam sit amet ullamcorper augue.
</div>
display:table-cell instead of float:
.right, .left { display:table-cell; border:1px solid; }
<div class="row">
<div class=" col-3 col-m-12 right">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id facilisis augue, vel dictum velit. Nam rutrum, sem in finibus congue, neque sapien volutpat libero, ut pulvinar dui dolor non elit. Aliquam et rutrum orci, ut aliquet lorem. Maecenas eget nulla quam. Nullam sit amet ullamcorper augue.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id facilisis augue, vel dictum velit. Nam rutrum, sem in finibus congue, neque sapien volutpat libero, ut pulvinar dui dolor non elit. Aliquam et rutrum orci, ut aliquet lorem. Maecenas eget nulla quam. Nullam sit amet ullamcorper augue.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id facilisis augue, vel dictum velit. Nam rutrum, sem in finibus congue, neque sapien volutpat libero, ut pulvinar dui dolor non elit. Aliquam et rutrum orci, ut aliquet lorem. Maecenas eget nulla quam. Nullam sit amet ullamcorper augue.
</div>
<div class="col-9 col-m-12 left">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum id facilisis augue, vel dictum velit. Nam rutrum, sem in finibus congue, neque sapien volutpat libero, ut pulvinar dui dolor non elit. Aliquam et rutrum orci, ut aliquet lorem. Maecenas eget nulla quam. Nullam sit amet ullamcorper augue.
</div>
Anyone know how can i make this texts stay side to the icons? I already try everything..
HTML:
<section class="info">
<div class="container">
<div class="row">
<p>
<span class="fa fa-location-arrow fa-5x"></span>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitLorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elit
</p>
<p>
<span class="fa fa-credit-card fa-5x"></span>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitLorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elit
</p>
<p>
<span class="fa fa-calendar fa-5x"></span>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitLorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elit
</p>
</div>
</section>
CSS:
.info {
background: #f78840;
}
.info .row {
text-align: justify;
}
.info .row .fa {
color: black;
margin: 50px 20px 20px 20px;
}
.info .row p:last-child {
margin-bottom: 90px;
}
I've tried a lot but could not find a solution. Any help is very welcome.
.row {
position: relative;
}
.fa {
display: inline-block;
position: absolute;
left: 0px;
}
.row p {
margin-left: 100px; /* width of the icons */
}
I have not tried this live but it will give you a start of what you might can do.
Our you could add some more divs around the <p>-tags and make them position:relative.
You're already using Bootstrap I think. In that case use its media object. This makes sure that the text always stays to the right of the image. It might be a quite new addition to Bootstrap however.
For some more background information on the media object see Stubbornella's blogpost or CSS Wizardy's blogpost
Without your CSS it would look like below. Perhaps you need to add an additional class to the span inside the .media-left to give it a fixed width if you want all icons to take up the same width.
#import url('//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css');
#import url('//maxcdn.bootstrapcdn.com/bootstrap/3.3.0/css/bootstrap.min.css');
<section class="info">
<div class="container">
<div class="row">
<p>
<div class="media">
<div class="media-left">
<span class="fa fa-location-arrow fa-5x"></span>
</div>
<div class="media-body">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitLorem ipsum dolor sit amet,
consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitem ipsum dolor sit amet, consectetur adipiscing
elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elit
</div>
</div>
<div class="media">
<div class="media-left">
<span class="fa fa-credit-card fa-5x"></span>
</div>
<div class="media-body">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitLorem ipsum dolor sit amet,
consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitem ipsum dolor sit amet, consectetur adipiscing
elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elit
</div>
</div>
<div class="media">
<div class="media-left">
<span class="fa fa-calendar fa-5x"></span>
</div>
<div class="media-body">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitLorem ipsum dolor sit amet,
consectetur adipiscing elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elitem ipsum dolor sit amet, consectetur adipiscing
elit. Suspendisse in enim ornare nunc mattis congue eu vitae libero. Mauris elit urna, placerat mollis mi consectetur, imperdiet auctor massa. Cras finibus turpis eget elit
</div>
</div>
</div>
</div>
</section>
My site works perfectly in Chrome in FF but IE is ignoring my Media Queries entirely and messing with my float: left elements. The elements are 9 images set up in table (but I'm using floats for responsiveness) of 3 rows and 3 columns. The first row shows up correctly but the second row is messed up, bumping the third photo onto its own row, like this:
PHOTO PHOTO PHOTO
PHOTO PHOTO
PHOTO
PHOTO PHOTO PHOTO
When it should be:
PHOTO PHOTO PHOTO
PHOTO PHOTO PHOTO
PHOTO PHOTO PHOTO
Again, this is ONLY happening in IE, I'm using IE 10 and 11 for testing.
Here's my css:
#teambiowrap
{
width: 100%;
clear: both;
}
#teambio
{
width: 28%;
float: left;
padding: 2.5%;
margin-bottom: 10px;
text-align: justify;
}
.bioimg
{
width: 99%;
max-width: 800px;
min-width: 100px;
}
#media screen and (max-width:800px) {
#teambio {
float: none;
width: 90%;
padding: 5%;
}
}
And HTML:
<div id="teambiowrap">
<h3>meet our team</h3>
<div id="teambio">
<img class="bioimg" src="Images/bioexample.png"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div id="teambio">
<img class="bioimg" src="Images/chris.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div id="teambio">
<img class="bioimg" src="Images/andy.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div id="teambio">
<img class="bioimg" src="Images/tim.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div id="teambio">
<img class="bioimg" src="Images/dave.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div id="teambio">
<img class="bioimg" src="Images/jim.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div id="teambio">
<img class="bioimg" src="Images/jess.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div id="teambio">
<img class="bioimg" src="Images/amanda.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div id="teambio">
<img class="bioimg" src="Images/victor.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
</div>
First of all, replace the #teambio with a .teambio class in your html and css. Then, repost your issue, if it still persists
<body>
<div class="teambiowrap">
<h3>meet our team</h3>
<div class="teambio">
<img class="bioimg" src="Images/bioexample.png"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="teambio">
<img class="bioimg" src="Images/chris.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="teambio">
<img class="bioimg" src="Images/andy.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="teambio">
<img class="bioimg" src="Images/tim.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="teambio">
<img class="bioimg" src="Images/dave.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="teambio">
<img class="bioimg" src="Images/jim.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="teambio">
<img class="bioimg" src="Images/jess.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="teambio">
<img class="bioimg" src="Images/amanda.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="teambio">
<img class="bioimg" src="Images/victor.jpg"><br><br><strong>NAME</strong> Position<br><br>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum sit amet tempor tellus. Nulla sed ligula in tellus eleifend ullamcorper. Nunc mi neque, interdum nec nulla id, hendrerit lacinia mi. Ut gravida libero ac tristique elementum. Nam tristique dui quis metus accumsan luctus. Vestibulum dictum.
</div>
<div class="clear"></div>
</div>
</body>
<script type="text/javascript" src="js/respond.js"></script>
mediaqueries is not support same page IE browser. this time css extrenal file use but no change your css. Also, you should note that using respond.js could cause a delay in which you see the non-media query styles before the media query styles are parsed and applied. The recommendation is that you put respond.js in the header to avoid this as much as possible, although, it's also good to keep your js files in the footer so up to you.and use id replace in class.
respond js:https://github.com/scottjehl/Respond/commit/4d60f45716b8395e6f24238f9dc5e34c857e87f2