How to get 'four corner' alignment with floated divs - html

Ok so my project requires my divs to be floated because I would like to place text neatly to the side of them. I can get my divs to float left and right as needed, but as you see from the snippet(even though it's not what you'd get from a browser since the dimensions are off), the two divs at the bottom I need to be near the top in order to make a perfect scquare with the two left-floated divs. Below is what I'm looking for:
.clear {
clear: both;
}
#centerbar {
width: 100%;
height: calc(100vh - 150px);
background-color: black;
float: left;
}
#centerbar h1 {
text-align: center;
color: white;
}
html {
height: 100%;
}
body {
height: 100%;
margin: 0;
font-family: courier;
font-size: 19px;
color: white;
}
#container {
min-height: 100%;
margin-bottom: -150px;
width: 100%;
}
#container:after {
content: "";
display: block;
}
#content {
display: flex;
margin: 0 auto;
width: 800px;
flex-wrap: wrap;
justify-content: center;
}
.box {
height: 200px;
}
.fltlt {
float: left;
margin-right: 50px;
}
.fltrt {
float: right;
margin-right: 50px;
}
<div class="container">
<div id="nav">
<ul>
<li>Home
</li>
<li>Works
</li>
<li>About
</li>
</ul>
</div>
<div class="clear"></div>
<div id="centerbar">
<h1>Sample Layout</h1>
<div class="box">
<img src="gold.jpg" alt="The Color Gold" class="fltlt">
<p>This is some sample text</p>
</div>
<div class="clear"></div>
<div class="box">
<img src="grey.jpg" alt="The Color Grey" class="fltlt">
<p>This is some sample text</p>
</div>
<div class="box">
<img src="orange.jpg" alt="The Color Orange" class="fltrt">
<p>This is some sample text</p>
</div>
<div class="box">
<img src="red.png" alt="The Color Red" class="fltrt">
<p>This is some sample text</p>
</div>
</div>
</div>
<div id="footer">
<div class="wrap">
<div class="sub">Lorem Ipsum</div>
<div class="sub">Lorem Ipsum</div>
<div class="sub">Lorem Ipsum</div>
</div>
</div>

I recommend to not use float for layout, and since you started out with flex, use it all the way.
Bonus: A clean, simple and readable structure of both CSS and markup.
.container .row {
display: flex;
flex-wrap: wrap;
}
.row .box {
width: 50%;
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 10px;
}
.box img {
width: 100px;
margin-right: 10px;
}
<div class="container">
<div class="row">
<div class="box">
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSr2zmmalj8xwazqph9jB97VW8MgfrfJ_ThJt9iTGKGMNl-7dp7mKnfvg4" alt="">
<p>Some paragraph here</p>
</div>
<div class="box">
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSr2zmmalj8xwazqph9jB97VW8MgfrfJ_ThJt9iTGKGMNl-7dp7mKnfvg4" alt="">
<p>Some paragraph here</p>
</div>
<div class="box">
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSr2zmmalj8xwazqph9jB97VW8MgfrfJ_ThJt9iTGKGMNl-7dp7mKnfvg4" alt="">
<p>Some paragraph here</p>
</div>
<div class="box">
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSr2zmmalj8xwazqph9jB97VW8MgfrfJ_ThJt9iTGKGMNl-7dp7mKnfvg4" alt="">
<p>Some paragraph here</p>
</div>
</div>
</div>

Here is what you are looking for(I made it from the start):
.box {
float: left;
position: relative;
width: 50%;
margin-bottom: 10px;
}
.container .flex {
display: flex;
align-items: center;
}
.container p {
margin-left: 5px;
}
<div class="container">
<div class="row">
<div class="box">
<div class="flex">
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSr2zmmalj8xwazqph9jB97VW8MgfrfJ_ThJt9iTGKGMNl-7dp7mKnfvg4" alt="" width="100">
<p>Some paragraph here</p>
</div>
</div>
<div class="box">
<div class="flex">
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSr2zmmalj8xwazqph9jB97VW8MgfrfJ_ThJt9iTGKGMNl-7dp7mKnfvg4" alt="" width="100">
<p>Some paragraph here</p>
</div>
</div>
<div class="box">
<div class="flex">
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSr2zmmalj8xwazqph9jB97VW8MgfrfJ_ThJt9iTGKGMNl-7dp7mKnfvg4" alt="" width="100">
<p>Some paragraph here</p>
</div>
</div>
<div class="box">
<div class="flex">
<img src="https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcSr2zmmalj8xwazqph9jB97VW8MgfrfJ_ThJt9iTGKGMNl-7dp7mKnfvg4" alt="" width="100">
<p>Some paragraph here</p>
</div>
</div>
</div>
</div>

Related

I need help sort my images properly in CSS, HTML

I am new to web development and I am trying to make a website for sorting my pictures in CSS, HTML5. What I want the sorting to look like the text separates the images like a new paragraph.how it looks I tried to add
<br />
but that did not work as I expected. Thanks for any help I can get :)
#pics {
margin-top: 10px;
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.pics-text {
font-family: 'Roboto', sans-serif;
font-size: 36px;
color: #ffffff;
opacity: 87%;
}
.pic-item {
float: left;
position: relative;
width: 20%;
padding-top: 5px;
padding-right: 7px;
}
.pic-item a img {
width: 100%;
border-radius: 5px;
}
<div id="pics">
<h2 class="pics-text">some text</h2>
<div class="pic-item">
<img src="./imgs/123-vertical/1.jpg" />
</div>
<div class="pic-item">
<img src="./imgs/123-vertical/2.jpg" />
</div>
<div class="pic-item">
<img src="./imgs/123-vertical/3.jpg" />
</div>
</div>
<div id="pics">
<h2 class="pics-text">some text</h2>
<div class="pic-item">
<img src="./imgs/123-vertical/1.jpg" />
</div>
<div class="pic-item">
<img src="./imgs/123-vertical/2.jpg" />
</div>
<div class="pic-item">
<img src="./imgs/123-vertical/3.jpg" />
</div>
</div>
So you want one image and a text below it or image and text beside?
If you want to some image and then some text then put all your Items in a div and make your container div flex with direction: column.
.first{
display: flex;
flex-direction:row;
}
img{
width: 50%
}
and the HTML would be
<h1>Some Text</h1>
<div class="first">
<img src="https://img.favpng.com/20/20/8/football-sport-ball-game-png-favpng-8PPaPFsNEixHevLDVTnWJTegN.jpg" alt="football"/>
<img src="https://img.favpng.com/20/20/8/football-sport-ball-game-png-favpng-8PPaPFsNEixHevLDVTnWJTegN.jpg" alt="football"/>
<img src="https://img.favpng.com/20/20/8/football-sport-ball-game-png-favpng-8PPaPFsNEixHevLDVTnWJTegN.jpg" alt="football"/>
</div>
<h1>Some Text</h1>
<div class="first">
<img src="https://img.favpng.com/20/20/8/football-sport-ball-game-png-favpng-8PPaPFsNEixHevLDVTnWJTegN.jpg" alt="football"/>
<img src="https://img.favpng.com/20/20/8/football-sport-ball-game-png-favpng-8PPaPFsNEixHevLDVTnWJTegN.jpg" alt="football"/>
<img src="https://img.favpng.com/20/20/8/football-sport-ball-game-png-favpng-8PPaPFsNEixHevLDVTnWJTegN.jpg" alt="football"/>
</div>
-You need to put all your Items in a div and make your container div flex with column direction.
- IDs must be unic, so You are not allowed to use one id for multiple elements in your HTML Code.
body{
background-color:red;
}
.container{
display:flex;
flex-direction:column;
}
#first, #second{
margin-top: 10px;
max-width: 1500px;
margin-left: auto;
margin-right: auto;
}
.pics-text{
font-family: 'Roboto', sans-serif;
display:flex;
font-size: 36px;
color: #ffffff;
opacity: 87%;
}
.pic-item {
float: left;
position: relative;
width: 20%;
padding-top: 5px;
padding-right: 7px;
}
.pic-item a img {
width: 100%;
border-radius: 5px;
}
<div class="container">
<div id="first">
<h2 class="pics-text">some text</h2>
<div class="pic-item">
<img src="https://images.redbullshop.com/is/image/RedBullSalzburg/RB-product-detail/RBS19168_3H_1/RBS-Champions-League-Ball.jpg" />
</div>
<div class="pic-item">
<img src="https://images.redbullshop.com/is/image/RedBullSalzburg/RB-product-detail/RBS19168_3H_1/RBS-Champions-League-Ball.jpg" />
</div>
<div class="pic-item">
<img src="https://images.redbullshop.com/is/image/RedBullSalzburg/RB-product-detail/RBS19168_3H_1/RBS-Champions-League-Ball.jpg" />
</div>
</div>
<div id="second">
<h2 class="pics-text">some text</h2>
<div class="pic-item">
<img src="https://images.redbullshop.com/is/image/RedBullSalzburg/RB-product-detail/RBS19168_3H_1/RBS-Champions-League-Ball.jpg" />
</div>
<div class="pic-item">
<img src="https://images.redbullshop.com/is/image/RedBullSalzburg/RB-product-detail/RBS19168_3H_1/RBS-Champions-League-Ball.jpg" />
</div>
<div class="pic-item">
<img src="https://images.redbullshop.com/is/image/RedBullSalzburg/RB-product-detail/RBS19168_3H_1/RBS-Champions-League-Ball.jpg" />
</div>
</div>
</div>

I need to create a table which is more difficult than my normal tables

I am struggling with getting the long box on the left to appear next to boxes 1-9. I'm actually fine with all the colours and box shadows etc. I've been trying for hours!
I thought that CSS grids might be the answer, but some of my customers are IE11 and some are Edge.
This is what I'm trying to achieve:
https://imgur.com/6kweieJ
https://i.imgur.com/6kweieJ.png?1
Hope you can help
Solution so far
<style>
* {
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
}
/* Float four columns side by side */
.column {
float: left;
width: 20%;
padding: 0 10px;
}
/* Remove extra left and right margins, due to padding */
.row {margin: 0 -5px;}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
/* Responsive columns */
#media screen and (max-width: 600px) {
.column {
width: 100%;
display: block;
margin-bottom: 20px;
}
}
/* Style the 9 cards */
.card {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
padding: 16px;
text-align: center;
color: white;
}
/* Style the top left card */
.cardtopleft {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
padding: 16px;
text-align: center;
background-color: #10069f;
}
</style>
<div class="allboxes">
<div class="row">
<div class="column">
<div class="cardtopleft">
<h3>
<span class="ms-rteThemeForeColor-1-0">​Box top left</span></h3>​
<br/></div>
</div>
<div class="column">
<div class="card" style="background-color: #10069f;">
<h3>Car​d 1<br/></h3> ​
<br/></div>
</div>
<div class="column">
<div class="card" style="background-color: #10069f;">
<h3>Card 2<br/></h3>
<br/>
</div>
</div>
<div class="column">
<div class="card" style="background-color: #10069f;">
<h3>Card 3<br/></h3>
<br/>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="column">
<div class="card" style="background-color: #10069f;">
<h3>Long box<br/></h3>
<p>
<br/> </p>
<p>
<br/> <br/></p>
<p>
<br/> <br/></p>
<p>
<br/> <br/></p>
<p>
<br/> </p>
</div>
</div>
<div class="column">
<div class="card" style="background-color: #007588;">
<h3>Card 4<br/></h3>
<p>Some text</p>
<p>Some text</p>
</div>
</div>
<div class="column">
<div class="card" style="background-color: #00bfbd;">
<h3>Card 5<br/></h3>
<p>Some text</p>
<p>Some text</p>
</div>
</div>
<div class="column">
<div class="card" style="background-color: #8be8df;">
<h3>Card 6<br/></h3>
<p>Some text</p>
<p>Some text​​​<br/></p>
</div>
</div>
</div>
<br/> <br/>​
<br/></div>
Flexbox. You basically have 2 rows. The second row has a nested 4 column flexbox. Nail the "box top left" and "long box" to a fixed width size, maybe 96px or so. Then use flex: 0 1 auto on the inner boxes so they auto stretch to fill what space is left.
There's a starter playground called CSS Flexbox Please!
If you are able to I would use css grid. You can achieve this layout without a lot of nested html elements. I guess it depends how much this design is set in stone. So basically I have an outer grid that is using 2 columns, the first 100px wide and the other occupies the rest of the available space. The inner grid is used for boxes 1-9, and they are each using 1/3 of the available space in the parent container. The grid-gap property make it easy to space things evenly and not have to take margins into account when calculating widths.
.grid {
display:grid;
}
.grid.outer {
grid-template-columns: 100px 1fr;
grid-gap: 10px;
background:#FFFFFF;
width:100%;
}
.box {
padding:20px;
color:#FFFFFF;
background-color: pink;
border:1px solid #666666;
display:flex;
align-items:center;
justify-content:center;
}
.grid.inner {
grid-template-columns: repeat(3, 1fr);
grid-gap: 10px;
}
<div class='grid outer'>
<div class='box'>Header Left Box</div>
<div class='box'>Header Box</div>
<div class='box'>Long box</div>
<div class='grid inner'>
<div class='box'>Box1</div>
<div class='box'>Box2</div>
<div class='box'>Box3</div>
<div class='box'>Box4</div>
<div class='box'>Box5</div>
<div class='box'>Box6</div>
<div class='box'>Box7</div>
<div class='box'>Box8</div>
<div class='box'>Box9</div>
</div>
</div>
Here is the solution using display:flex
<style>
* {
box-sizing: border-box;
}
body {
font-family: Arial, Helvetica, sans-serif;
}
/* Float four columns side by side */
.column {
float: left;
width: 20%;
padding: 0 10px;
}
/* Remove extra left and right margins, due to padding */
.row {margin: 0 -5px; display: flex; flex-wrap: wrap;}
/* Clear floats after the columns */
.row:after {
content: "";
display: table;
clear: both;
}
/* Responsive columns */
#media screen and (max-width: 600px) {
.column {
width: 100%;
display: block;
margin-bottom: 20px;
}
}
/* Style the 9 cards */
.card {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
padding: 16px;
text-align: center;
color: white;
height: 100%;
box-sizing: border-box;
}
/* Style the top left card */
.cardtopleft {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
padding: 16px;
text-align: center;
background-color: #10069f;
}
</style>
<div class="allboxes">
<div class="row">
<div class="column">
<div class="cardtopleft">
<h3>
<span class="ms-rteThemeForeColor-1-0">​Box top left</span></h3>​
<br/></div>
</div>
<div class="column">
<div class="card" style="background-color: #10069f;">
<h3>Car​d 1<br/></h3> ​
<br/></div>
</div>
<div class="column">
<div class="card" style="background-color: #10069f;">
<h3>Card 2<br/></h3>
<br/>
</div>
</div>
<div class="column">
<div class="card" style="background-color: #10069f;">
<h3>Card 3<br/></h3>
<br/>
</div>
</div>
</div>
<br/>
<div class="row">
<div class="column">
<div class="card" style="background-color: #10069f;">
<h3>Long box<br/></h3>
<p>
<br/> </p>
<p>
<br/> <br/></p>
<p>
<br/> <br/></p>
<p>
<br/> <br/></p>
<p>
<br/> </p>
</div>
</div>
<div class="column">
<div class="card" style="background-color: #007588;">
<h3>Card 4<br/></h3>
<p>Some text</p>
<p>Some text</p>
</div>
</div>
<div class="column">
<div class="card" style="background-color: #00bfbd;">
<h3>Card 5<br/></h3>
<p>Some text</p>
<p>Some text</p>
</div>
</div>
<div class="column">
<div class="card" style="background-color: #8be8df;">
<h3>Card 6<br/></h3>
<p>Some text</p>
<p>Some text​​​<br/></p>
</div>
</div>
</div>
<br/> <br/>​
<br/></div>

Getting text to appear below a picture

Hi guys so i am trying to get some text to appear below a picture i have using bootstrap version 3
So far i have :
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3"><img alt="my image" class="img-about" src="Images/s1.fw.png"></div>
<div class="col-md-3">
<h2>aa</h2>
</div>
But so far its appearing side by side, but i would like it to appear below each other So the picture on the top and then text below e.g
Picture
-Text
Thanks
If you want your text to be underneath the image, don't put it in the separate column.
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3">
<img alt="my image" class="img-about" src="Images/s1.fw.png"></div>
<h2>aa</h2>
<div class="col-md-3">
// Use this for seconfd image in the right of the 1st one.
</div>
</div>
If your looking for a different approach. More
p {
font-family: 'Noto Sans', sans-serif;
font-size: 1.1em;
line-height: 1.5em;
color: #666;
}
img {
max-width: 100%;
height: auto;
margin: 5px 0 50px;
}
.grid {
display: -webkit-flex;
display: flex;
}
.col {
padding: 30px;
}
.fluid-flex {
-webkit-flex: 1;
flex: 1;
/* Not supported by Safari */
}
<div class="grid">
<div class="col fluid-flex">
<h1>My Image 1</h1>
<img src="https://s.zkcdn.net/Advertisers/cd7db6dc529e4cd3a3b9483b34465631.png" alt="Image" title="Image" />
<p>This was taken when i was in TX.
</p>
</div>
<div class="col fluid-flex">
<h1>My Image 2</h1>
<img src="https://s.zkcdn.net/Advertisers/cd7db6dc529e4cd3a3b9483b34465631.png" alt="Image" title="Image" />
<p>This was taken when i was in CA.
</p>
</div>
<div class="col fluid-flex">
<h1>My Image 3</h1>
<img src="https://s.zkcdn.net/Advertisers/cd7db6dc529e4cd3a3b9483b34465631.png" alt="Image" title="Image" />
<p>This was taken when i was in NY.
</p>
</div>
Without bootstrap:
.wrapper {
width: 150px;
border:1px solid #ccc;
padding: 10px;
}
img {
width: 100%;
border: 1px solid #ccc;
padding: 2px;
}
h2 {
text-align: center;
}
<div class="wrapper">
<img alt="my image" class="img-about" src="http://justcuteanimals.com/wp-content/uploads/2016/10/baby-bear-pictures-cute-animal-pics.jpg">
<h2>Some Text</h2>
</div>

how do I vertically align boxes in middle

Basically, i would like to align these items in the middle. It's three items that i want to align in the middle, vertically. I've tried vertical align: middle, but it didn't work.. I don't prefer position:absolute tho.
HTML
` <div class="info">
<div class="box">
<div class="cont">
<img src="http://lorempixel.com/400/200/sports/1/">
<h5>lorem lorem</h5>
<p>88</p>
</div>
</div>
<div class="box">
<div class="cont">
<img src="http://lorempixel.com/400/200/sports/1/">
<h5>lorem lorem</h5>
<p>88</p>
</div>
</div>
<div class="box">
<div class="cont">
<img src="http://lorempixel.com/400/200/sports/1/">
<h5>lorem lorem</h5>
<p>88</p>
</div>
</div>
<div class="box">
<div class="cont">
<img src="http://lorempixel.com/400/200/sports/1/">
<h5>lorem lorem</h5>
<p>88</p>
</div>
</div>
</div>
CSS
.info{
width:100%;
height:50vw;
background-color: #FFAE00;
margin-top:0;
display: flex;
text-align: center;
}
.box h5{
font-size: 2vw;
}
.box{
width:25%;
height:100%;
display: inline-block;
margin-top:3vw;
}
.box img{
width:7vw;
height:7vw;
}
.box p{
font-size: 6vw;
}
FIDDLE: https://jsfiddle.net/5Lstx44y/
I made a few changes to your CSS, this is using the table/table-cell pattern. It's pretty cool cause it will work with any size content without hacking it with margins/padding. You can adjust <.info>'s height to see what I mean.
Here is the updated version: https://jsfiddle.net/x5rdLgv2/
Main differences are:
.box {
display: table;
}
.cont {
display: table-cell;
vertical-align: middle;
}
I also removed some of your hacked margins!
Change css style for box to
.box {
width: 25%;
height: 100%;
display: inline-block;
vertical-align: middle;
padding-top: 25%; //Increase or Decrease as your need.
}
Use flex-direction:column
for more example use this link
.info{
width:100%;
height:100vh
background-color: #FFAE00;
margin-top:0;
display: flex;
text-align: center;
flex-direction:column;
}
.box h5{
font-size: 2vw;
}
.box{
margin-top:3vw;
}
.box img{
width:7vw;
height:7vw;
}
.box p{
font-size: 6vw;
}
<div class="info">
<div class="box">
<div class="cont">
<img src="http://lorempixel.com/400/200/sports/1/">
<h5>lorem lorem</h5>
<p>88</p>
</div>
</div>
<div class="box">
<div class="cont">
<img src="http://lorempixel.com/400/200/sports/1/">
<h5>lorem lorem</h5>
<p>88</p>
</div>
</div>
<div class="box">
<div class="cont">
<img src="http://lorempixel.com/400/200/sports/1/">
<h5>lorem lorem</h5>
<p>88</p>
</div>
</div>
<div class="box">
<div class="cont">
<img src="http://lorempixel.com/400/200/sports/1/">
<h5>lorem lorem</h5>
<p>88</p>
</div>
</div>
</div>

Centering images with text as menu

Im trying to put together some images together with an text under the images which will work as an menu, which should be centered horizontal under an header. The website is supposed to work as an responsive website. The HTML and CSS code is currently looking like this:
Edited
I want 5 images, each one of them shall have a text under them. And I want the my images together with the text to be centered.
HTML
<nav>
<div id="content">
<img src="ikoner/icon_90_2.png"/>
<div class="text">Utvecklingen sedan 90-talet</div>
</div>
<div id="content">
<img src="ikoner/icon_html5.png"/>
<div class="text">HTML5</div>
</div>
<div id="content">
<img src="ikoner/icon_html5video.png"/>
<div class="text">HTML5 Video</div>
</div>
<div id="content">
>img src="ikoner/icon_responsive.png"/>
<div class="text">Responsive Webdesign</div>
</div>
<div id="content">
<img src="ikoner/icon_heart.png"/>
<div class="text">Emotional Design</div>
</div>
</nav>
CSS
#content {
position: relative;
width: 15%;
display: inline-block;
text-align: center;
margin-left: auto;
margin-right: auto;
}
#content img {
padding-top: 370px;
width: 100px;
}
.text {
font-size: 12px;
font-family: 'ciclethin';
text-decoration: none;
}
You're not aligning your "Nav" div anywhere.
So, I've changed the id="content" to classes, because IDs should be unique to the page.
Set nav element to text-align:center. Here's a fiddle, and the relevant code:
http://jsfiddle.net/cw16tkdn/2/
<nav>
<div class="content">
<img src="http://placekitten.com/g/200/200" />
<div class="text">Utvecklingen sedan 90-talet
</div>
</div>
<div class="content">
<img src="http://placekitten.com/g/200/200" />
<div class="text">HTML5
</div>
</div>
<div class="content">
<img src="http://placekitten.com/g/200/200" />
<div class="text">HTML5 Video
</div>
</div>
<div class="content">
<img src="http://placekitten.com/g/200/200" />
<div class="text">Responsive Webdesign
</div>
</div>
<div class="content">
<img src="http://placekitten.com/g/200/200" />
<div class="text">Emotional Design
</div>
</div>
</nav>
and CSS:
nav {
text-align:center;
}
.content {
display: inline-block;
text-align: center;
}
.content img {
width: 100px;
}
.text {
font-size: 12px;
font-family:'ciclethin';
text-decoration: none;
}
maybe you want this: (i have changed id=content with class=content in html code!)
.content {
position: relative;
width: 100px;
display: inline-block;
height: 520px;
text-align: center;
vertical-align:bottom;
}
.content img {
padding-top: 370px;
width: 100px;
display:block;
margin: auto;
}
.text a {
font-size: 12px;
font-family: 'ciclethin';
text-decoration: none;
}
.text {
height: 3em;
}