How to make div center align with the div left align? - html

I have a parent Div center align in the page and the content is dynamic added to the parent Div based on the result.
The parent div is 100% wide and center in the page and expect the result should be
_______________________________________
| [Image] [Image] [Image] |
| [text ] [text ] [text ] |
| [Image] [Image] |
| [text ] [text ] |
But the result is
_______________________________________
| [Image] [Image] [Image] |
| [text ] [text ] [text ] |
| [Image] [Image] |
| [text ] [text ] |
.row {
width: 100%;
text-align: center;
}
.block {
display:inline-block;
margin-left: 10px;
}
.block img {
display:block;
}
.block span {
width : 100%;
text-align: center;
}
<div class="row">
<div class="block" width="320" height="200">
<img src="a.jpg"></img>
<span>a.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="b.jpg"></img>
<span>b.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="c.jpg"></img>
<span>c.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="d.jpg"></img>
<span>d.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
</div>

I used an extra container around the images. The container itself will be in the center of the page using auto margin for the left and right side.
The images are positioned using flexbox which is responsive by default.
Class .block has text-align: center; to put the text correctly below the image.
I removed the </img> tags since they are incorrect.
.row {
width: 100%;
}
.block {
display: inline-block;
margin-left: 10px;
text-align: center;
}
.block img {
display: block;
}
.block span {
width: 100%;
text-align: center;
}
.container {
display: flex;
flex-wrap: wrap;
width: 80%;
margin: 0 auto;
}
<div class="row">
<div class="container">
<div class="block" width="320" height="200">
<img src="http://via.placeholder.com/150x150">
<span>a.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="http://via.placeholder.com/150x150">
<span>b.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="http://via.placeholder.com/150x150">
<span>c.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="http://via.placeholder.com/150x150">
<span>d.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="http://via.placeholder.com/150x150">
<span>e.jpg</span>
</div>
</div>
</div>

You are aligning the content with the text-align: center; tag which always will center the elements, if you want them to align to a side you should use float: left;.
Hope it helps.

You can achieve your desired result with the following code.
<div class="row">
<div class="block" width="320" height="200">
<img src="a.jpg"></img>
<span>a.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="b.jpg"></img>
<span>b.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="c.jpg"></img>
<span>c.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="d.jpg"></img>
<span>d.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
</div>
.row {
width: 100%;
text-align: center;
}
.wrap {
display: inline-block;
text-align: left;
}
.block {
display:inline-block;
margin-left: 10px;
}
.block img {
display:block;
}
.block span {
width : 100%;
text-align: center;
}

For row class correct css as below:
.row {
width: 100%;
}

add css below:
.block {width: 33.33%;float: left;text-align: center;}
.block img {display: block;margin: auto;} & .block span{display: block;}

You can try row text-align: center; to change text-align: left;
HTML:
.row {
width: 100%;
text-align: left;
}
.block {
display:inline-block;
margin-left: 10px;
}
.block img {
display:block;
}
.block span {
width : 100%;
text-align: center;
}
<div class="row">
<div class="block" width="320" height="200">
<img src="a.jpg"></img>
<span>a.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="b.jpg"></img>
<span>b.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="c.jpg"></img>
<span>c.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="d.jpg"></img>
<span>d.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
<div class="block" width="320" height="200">
<img src="e.jpg"></img>
<span>e.jpg</span>
</div>
</div>

Related

How to have images next to each other with centered links under them?

I want to have 2 (or more) images with links under them that lead to other pages. I want the images to be next to each other and the links under them to be centered under the images they represent. Is there any way to do this? Here's an image with the layout I'm looking for:
Note #1: IMG 1 and IMG 2 have the same height.
Note #2: Anchor 1 is centered under IMG 1 and Anchor 2 is centered under IMG 2.
My current code:
<div class="wrapper">
<div class="sportswear-link men">
<img
src="images/SPW_Column_1.jpg"
alt="Men sportswear"
height="400px"
/>
Мъжка екипировка
</div>
<div class="sportswear-link women">
<img
src="images/SPW_Header_Column_2.jpg"
alt="Women sportswear"
height="400px"
/>
Женска екипировка
</div>
</div>
.wrapper {
text-align: center;
overflow: hidden;
}
.sportswear-link {
display: inline;
clear: both;
}
My current result:
Here's an example using flex and some more appropriate html tags. Cheers
.wrapper {
display: flex;
}
.sportswear-link {
display: flex;
flex-direction: column;
align-items: center;
}
<section class="wrapper">
<figure class="sportswear-link men">
<img
src="https://picsum.photos/400"
alt="Men sportswear"
height="400px"
/>
<figcaption>Мъжка екипировка</figcaption>
</figure>
<figure class="sportswear-link women">
<img
src="https://picsum.photos/400"
alt="Women sportswear"
height="400px"
/>
<figcaption>Женска екипировка</figcaption>
</figure>
</section>
.wrapper {
display: flex;
align-content: center;
}
.sportswear-link {
text-align: center;
margin: 10px;
}
<div class="wrapper">
<div class="sportswear-link men">
<img
src="https://images.unsplash.com/photo-1603739421258-4aa79ad860df?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxzZWFyY2h8Mjh8fHNub3d8ZW58MHx8MHx8&w=1000&q=80"
alt="Men sportswear"
height="400px"
/>
Мъжка екипировка
</div>
<div class="sportswear-link women">
<img
src="https://cdn.mos.cms.futurecdn.net/ZAhFASRscCscBUj33239dH.jpg"
alt="Women sportswear"
height="400px"
/>
Женска екипировка
</div>
</div>
you can use display:flex; and align-items:center; to center the links.
Here is the example.
.wrapper{
display:flex;
}
.sportswear-link{
display:flex;
flex-direction:column;
margin:20px;
align-items:center;
}
<!-- <div class="wrapper">
<div class="sportswear-link men">
<img
src="images/SPW_Column_1.jpg"
alt="Men sportswear"
height="400px"
/>
Мъжка екипировка
</div>
<div class="sportswear-link women">
<img
src="images/SPW_Header_Column_2.jpg"
alt="Women sportswear"
height="400px"
/>
Женска екипировка
</div>
</div> -->
<!DOCTYPE html>
<html>
<head>
<title>Flex</title>
</head>
<body>
<div class="wrapper">
<div class="sportswear-link men">
<img width="200" src="https://upload.wikimedia.org/wikipedia/commons/8/84/Ski_Famille_-_Family_Ski_Holidays.jpg"/>
Skiing
</div>
<div class="sportswear-link women">
<img width="200" src="https://upload.wikimedia.org/wikipedia/commons/8/84/Ski_Famille_-_Family_Ski_Holidays.jpg"/>
Skiing
</div>
</div>
</body>
</html>
using flexbox , can help you a lot. check the link for more explanation :
https://www.w3schools.com/css/css3_flexbox.asp
.wrapper {
display: flex;
}
.sportswear-link {
margin: 10px;
padding: 20px;
font-size: 30px;
}
<div class="wrapper">
<div class="sportswear-link men">
<img
src="https://picsum.photos/200/300"
alt="Men sportswear"
height="400px"
/>
Мъжка екипировка
</div>
<div class="sportswear-link women">
<img
src="https://picsum.photos/200/300"
alt="Women sportswear"
height="400px"
/>
Женска екипировка
</div>
</div>

Picture Gallery HTML CSS

I'm having trouble with image sizing in my gallery, I have been reading multiple threads and yt videos but can't seem to figure it out myself
image of the problem:
* {
box-sizing: border-box;
}
.gallery {
border: 1px solid #ccc;
}
.gallery img {
width: 100%;
height: auto;
}
.des {
padding: 15px;
text-align: center;
}
.responsive {
padding: 0 6px;
float: left;
width: 25%;
}
<h1>Veckans deals!</h1>
<div class="responsive">
<div class="gallery">
<img src="https://topracingdrone.com/wp-content/uploads/2018/12/DJI-Phantom-4-Photogrammetry-Drone-300x184.png" alt="Drönare" width="300" height="200">
<div class="des">Add a desciption of the picture</div>
</div>
</div>
<div class="responsive">
<div class="gallery">
<img src="https://topracingdrone.com/wp-content/uploads/2018/12/Holy-Stone-HS100-UAV-photography-drone-300x176.png" alt="Drönare" width="300" height="200">
<div class="des">Add a desciption of the picture</div>
</div>
</div>
<div class="responsive">
<div class="gallery">
<img src="https://topracingdrone.com/wp-content/uploads/2018/12/Parrot-Bebop-2-drone-300x143.jpeg" alt="Drönare" width="300" height="200">
<div class="des">Add a desciption of the picture</div>
</div>
</div>
<div class="responsive">
<div class="gallery">
<img src="https://topracingdrone.com/wp-content/uploads/2018/12/GoPro-Hero-4-Silver-300x300.jpg" alt="Landskap" width="300" height="200">
<div class="des">Add a desciption of the picture</div>
</div>
</div>
There is no way where you can make them all stretch while using float, without setting a fixed height to all images. You have three options.
Set a fixed height on the image and use object-fit: cover to make it look like it's stretching, while in fact it's covering it
Use flexbox with flex-grow: 1 on the image (see this example, recommended!)
Adjust all images to have the same width and height, if they can be made uniform.
I am sure that the images have different resolution.
First 2 images have the same resolution, 3:2 for example.
Last 2 images have the same resolution, 2:1 for example, but differs than first 2 images.
Please try to fix the resolutions of images all the same.
Your images are not the same height/width, just like the ones I found you when I made you a snippet. So decide on which direction is important and use vh/vw and auto
More here
* {
box-sizing: border-box;
}
.gallery {
border: 1px solid #ccc;
}
.gallery img {
width: auto;
height: 15vh;
}
.des {
padding: 15px;
text-align: center;
}
.responsive {
padding: 0 6px;
float: left;
width: 25%;
}
<h1>Veckans deals!</h1>
<div class="responsive">
<div class="gallery">
<img src="https://topracingdrone.com/wp-content/uploads/2018/12/DJI-Phantom-4-Photogrammetry-Drone-300x184.png" alt="Drönare" width="300" height="200">
<div class="des">Add a desciption of the picture</div>
</div>
</div>
<div class="responsive">
<div class="gallery">
<img src="https://topracingdrone.com/wp-content/uploads/2018/12/Holy-Stone-HS100-UAV-photography-drone-300x176.png" alt="Drönare" width="300" height="200">
<div class="des">Add a desciption of the picture</div>
</div>
</div>
<div class="responsive">
<div class="gallery">
<img src="https://topracingdrone.com/wp-content/uploads/2018/12/Parrot-Bebop-2-drone-300x143.jpeg" alt="Drönare" width="300" height="200">
<div class="des">Add a desciption of the picture</div>
</div>
</div>
<div class="responsive">
<div class="gallery">
<img src="https://topracingdrone.com/wp-content/uploads/2018/12/GoPro-Hero-4-Silver-300x300.jpg" alt="Landskap" width="300" height="200">
<div class="des">Add a desciption of the picture</div>
</div>
</div>

I would like to set a gallery of photos that is vertically centered on all sites

I would like to figure out how to get a series of images to be vertically aligned on the page so people can scroll left to right and view them. I have tried 'vertical-align: middle'as well as adjusting the top % to no avail, here's the current set-up
.page {
position: absolute;
width: 2400px;
vertical-align: middle;
}
.column {
float: left;
width: 400px;
padding: 5px;
}
.row::after {
content: "";
clear: both;
display: table;
}
<div class="page">
<div class="row">
<div class="column">
<img src="https://68.media.tumblr.com/94a2f217cbd0e1d3ae663764bfa3bef3/tumblr_oazuptRyRh1uz08p6o1_1280.jpg" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/gRAo4t8mm/icymi_03.png" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/QNbo4t8mh/moving_01.png" width="100%" />
</div>
<div class="column">
<img src="https://68.media.tumblr.com/94a2f217cbd0e1d3ae663764bfa3bef3/tumblr_oazuptRyRh1uz08p6o1_1280.jpg" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/gRAo4t8mm/image082.png" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/QNbo4t8mh/image257.png" width="100%" />
</div>
</div>
</div>
You may use the table-layout , so you get a single line and can use vertical-align:middle from the parent container .
here is an example without float and okay for browsers as old as FF 1 or IE8 . today, grid and flex can do a similar job in that case. Play snippet in full page to check out vertical-align behavior
body {
margin: 0;
padding: 0;
}
.page {
overflow-x: auto;
overflow-y: hidden;
height: 100vh;
box-sizing: border-box;
}
.row {
display: table;
height: 100%;
}
.column {
padding: 5px;
display: table-cell;
vertical-align: middle;
}
.column img {
width: 400px;
}
<div class="page">
<div class="row">
<div class="column">
<img src="https://68.media.tumblr.com/94a2f217cbd0e1d3ae663764bfa3bef3/tumblr_oazuptRyRh1uz08p6o1_1280.jpg" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/gRAo4t8mm/icymi_03.png" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/QNbo4t8mh/moving_01.png" width="100%" />
</div>
<div class="column">
<img src="https://68.media.tumblr.com/94a2f217cbd0e1d3ae663764bfa3bef3/tumblr_oazuptRyRh1uz08p6o1_1280.jpg" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/gRAo4t8mm/image082.png" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/QNbo4t8mh/image257.png" width="100%" />
</div>
</div>
</div>
with flex it could be :
body {
margin: 0;
padding: 0;
}
.row {
display: flex;
align-items:center;
min-height:100vh;
box-sizing:border-box;
}
.column {
padding: 5px;
min-width: 400px;
}
<div class="page">
<div class="row">
<div class="column">
<img src="https://68.media.tumblr.com/94a2f217cbd0e1d3ae663764bfa3bef3/tumblr_oazuptRyRh1uz08p6o1_1280.jpg" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/gRAo4t8mm/icymi_03.png" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/QNbo4t8mh/moving_01.png" width="100%" />
</div>
<div class="column">
<img src="https://68.media.tumblr.com/94a2f217cbd0e1d3ae663764bfa3bef3/tumblr_oazuptRyRh1uz08p6o1_1280.jpg" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/gRAo4t8mm/image082.png" width="100%" />
</div>
<div class="column">
<img src="http://static.tumblr.com/vbfmte2/QNbo4t8mh/image257.png" width="100%" />
</div>
</div>
</div>

Hover effect applies to all images

I have this code here:
#mg1 {
margin-left: 3%;
}
#mg1:hover {
margin-top: 4%;
}
<div id="section1">
<center>
<div id="bgp">
<center>
<p>THUMBNAILS</p>
</center>
</div>
</center>
<br>
<img src="321321321321.png" width="200" height="150" id="mg1">
<img src="ewqfh.png" width="200" height="150" id="mg2">
<img src="2321321.png" width="200" height="150" id="mg3">
</div>
The hover effect should only affect the image with the id="mg1", but instead it affects all my images; Why is this happening?
#mg1{
margin-left:3%;
position:relative;
}
#mg1:hover{
margin-top:4%;
}
img{
float:left;
}
<div id="section1">
<center><div id="bgp"><center><p>THUMBNAILS</p></center></div></center><br>
<img src="321321321321.png" width="200" height="150" id="mg1">
<img src="ewqfh.png" width="200" height="150" id="mg2">
<img src="2321321.png" width="200" height="150" id="mg3">
</div>
#section1{
position:relative;
}
#mg1,#mg2,#mg3{
position:absolute;
}
#mg1{
margin-left:3%;
}
#mg2{
top:200px;
}
#mg3{
left:200px;
}
#mg1:hover{
margin-top:15%;
transition:2s linear;
}
<div id="section1">
<center><div id="bgp"><center><p>THUMBNAILS</p></center></div></center><br>
<div id="mg1">
<img src="http://www.freeiconspng.com/uploads/green-humming-bird-png-4.png" width="200" height="150" ></div>
<div id="mg2"> <img src="http://www.freeiconspng.com/uploads/guitar-icon-png-18.jpg" width="200" height="150" ></div>
<div id="mg3"> <img src="http://www.imagenspng.com.br/wp-content/uploads/2015/02/super-mario-03.png" width="200" height="150" ></div>
</div>
Apply position:relative and z-index:1 to #mg1. and use top and left properties instead of margins, and instead of percentages, use vh and vw if your parent element is too small.
SNIPPET
#section1 {
height: 600px;
width: 800px;
}
#mg1:hover {
position: relative;
top: 4vh;
left: 3vw;
z-index: 1;
}
<div id="section1">
<center>
<div id="bgp">
<center>
<p>THUMBNAILS</p>
</center>
</div>
</center>
<br>
<img src="http://home.cse.ust.hk/~rossiter/mooc/matching_game/smile.png" width="200" height="150" id="mg1">
<img src="http://home.cse.ust.hk/~rossiter/mooc/matching_game/smile.png" width="200" height="150" id="mg2">
<img src="http://home.cse.ust.hk/~rossiter/mooc/matching_game/smile.png" width="200" height="150" id="mg3">
</div>
<!DOCTYPE html>
<html>
<head>
<style>
#mg1 {
margin-left: 3%;
}
#mg1:hover {
margin-top: 4%;
}
img{
position: relative;
float : left;
}
}
</style>
</head>
<body>
<div id="section1">
<center>
<div id="bgp">
<center>
<p>THUMBNAILS</p>
</center>
</div>
</center>
<br>
<img src="321321321321.png" width="200" height="150" id="mg1">
<img src="ewqfh.png" width="200" height="150" id="mg2">
<img src="2321321.png" width="200" height="150" id="mg3">
</div>
</body>
</html>

How to have these pictures side by side?

I would like to know how to edit this code to show these pictures centered side by side with each download button centered and underneath each picture, If anybody knows how to edit the code to this, it would be appreciated. Thanks.
The website link that I uploaded the code to, to test it can be seen below:
http://www.tekmillion.com/albums.html
.clearfix {
clear: both;
}
.divWithBtn {
float: left;
text-align: center;
padding: 10px;
}
.divWithBtn img,
.divWithBtn a{
display: block;
margin: 0 auto;
}
<HR>
<div class="container">
</br>
<span class="textformat1"><center><b>Albums</b></span></center>
</br>
<center>
<div class="clear">
<div class="divWithBtn">
<img src="images/london%20To%20Turkey%20-%20Front%20Cover.jpg" alt="london%20To%20Turkey%20-%20Front%20Cover" width="200" height="200">
<a href="LONDON%202%20TURKEY%20VOL.1.zip">
<img src="images/downloadbutton.png" alt="downloadbutton" width="150" height="50"></a>
</div>
<div class="divWithBtn">
<img src="images/LONDON%20TO%20TURKEY%20VOLUME%202%20(FRONT%20COVER).jpg" alt="LONDON%20TO%20TURKEY%20VOLUME%202%20(FRONT %20COVER)" width="200" height="200" border:none;>
<a href="LONDON%202%20TURKEY%20VOL.2.zip">
<img src="images/downloadbutton.png" alt="downloadbutton" width="150" height="50"></a>
</div>
<div class="divWithBtn">
<img src="images/Love%20%26%20Hate%20Volume.1%20(Front%20Cover).JPG" alt="Love%20%26%20Hate%20Volume.1%20(Front %20Cover)" width="200" height="200">
<a href="LOVE%20%26%20HATE%20VOL.1.zip">
<img src="images/downloadbutton.png" alt="downloadbutton" width="150" height="50"></a>
</div>
<div class="divWithBtn">
<img src="images/Gurbet%20Eli%20Volume.1%20(Front%20Cover).JPG" alt="Gurbet%20Eli%20Volume.1%20(Front%20Cover)" width="200" height="200">
<a href="GURBET%20ELI%20VOL.1.zip">
<img src="images/downloadbutton.png" alt="downloadbutton" width="150" height="50"></a>
</div>
</div>
</center>
</br>
Add following css to your code:
This css will make image side by side.
.divWithBtn {
display: inline-block;
}
Following css will make download button below the image.
.divWithBtn > a {
display: block;
}
Hope it helps.
Note: And your current css which you post here is not applied. Make sure it is applied to your html element. Check path for your css file.
add class "display_table" to outer div.
<div class="clear" class="display_table">
add styles for the class "divWithBtn"
.divWithBtn {
float:left;
text-align:center;
margin: 0px 20px;
}
And finally add div to the image tag
<div><img height="200" width="200" src="images/london%20To%20Turkey%20-%20Front%20Cover.jpg" alt="london%20To%20Turkey%20-%20Front%20Cover"></div>
Finall output
<div class="clear" class="display_table">
<div class="divWithBtn">
<div><img height="200" width="200" src="images/london%20To%20Turkey%20-%20Front%20Cover.jpg" alt="london%20To%20Turkey%20-%20Front%20Cover"></div>
<img height="50" width="150" src="images/downloadbutton.png" alt="downloadbutton"> </div>
<div class="divWithBtn">
<div> <img height="200" width="200" src="images/LONDON%20TO%20TURKEY%20VOLUME%202%20(FRONT%20COVER).jpg" alt="LONDON%20TO%20TURKEY%20VOLUME%202%20(FRONT %20COVER)" border:none;=""></div>
<img height="50" width="150" src="images/downloadbutton.png" alt="downloadbutton"> </div>
<div class="divWithBtn">
<div><img height="200" width="200" src="images/Love%20%26%20Hate%20Volume.1%20(Front%20Cover).JPG" alt="Love%20%26%20Hate%20Volume.1%20(Front %20Cover)"></div>
<img height="50" width="150" src="images/downloadbutton.png" alt="downloadbutton"> </div>
<div class="divWithBtn">
<div><img height="200" width="200" src="images/Gurbet%20Eli%20Volume.1%20(Front%20Cover).JPG" alt="Gurbet%20Eli%20Volume.1%20(Front%20Cover)">
<div> <img height="50" width="150" src="images/downloadbutton.png" alt="downloadbutton"> </div>
</div>
</div>
</div>
Css
.display_table { display: table; }
.divWithBtn { float: left; text-align: center; margin: 0px 20px; }