I want to add one card and an image,in two adjacent columns.But when I am trying to do it is coming in row manner,but what I want is that left side should be filled with card and right side with the image.
The div='column1'
contains the div in which image is present.The image must be on the right hand side and must be adjacent to card
The div='column2'
contains the card div and should be placed on the left on hand side.
My two div tags are appearing stacked whereas I want them to be appear adjacent to each other such as in columns.
Also does is there a difference between span
and div
tag, cause as far as I have used them they all feel the same to me.
Can anyone guide me in this context, also i am very bad with these columns and rows and grids stuff with css , any link that might help?
.column {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding: 10px;
height: 500px;
width: 400px;
/* Should be removed. Only for demonstration */
}
.column {
-webkit-flex: 1;
-ms-flex: 1;
flex: 1;
padding: 10px;
height: 500px;
width: 900px;
/* Should be removed. Only for demonstration */
}
* {
margin: 0px;
padding: 0px;
}
body {
font-family: Arial;
}
.card_agi_container {
border-radius: 10px;
background-color: #732a12;
width: 250px;
height: auto;
margin: 10%;
padding: 10px;
}
.background {
text-align: center;
background: linear-gradient(to left, #120a07, #851804);
border-top-right-radius: 10px;
border-top-left-radius: 10px;
}
.content {
background: linear-gradient(to left, #120a07, #851804);
padding: 10px;
border-bottom-left-radius: 10px;
border-bottom-right-radius: 10px;
}
.image {
height: 150px;
width: 250px;
border-radius: 5px;
}
.hero-name {
text-align: center;
font-size: 19px;
font-weight: lighter;
padding: 10px;
}
.hero-type {
background-color: black;
padding: 7px;
color: whitesmoke;
border-radius: 5px;
width: 100px;
display: block;
text-align: center;
position: relative;
top: -70px;
}
.dota2-hero-profile {
text-align: center;
font-size: 14px;
padding: 20px;
}
.hero-stats>p {
letter-spacing: 1px;
}
<div class="top-part">
<div class="row" text-align: center;>
<!-- The div for the card -->
<div class="column2">
<div class="card_agi_container">
<div class="background">
<img src="C:\Users\Hp\Desktop\New folder\img.jpg" class="image" alt="Nevermore">
</div>
<div class="content">
<h1 class="hero-name">Shadow Fiend</h1>
<span class="hero-type">Agility</span>
<div class="hero-stats">
<p>Win Rate : 50%</p>
<p>Pick Rate :50%</p>
<p>Ban Rate : 50%</p>
<p color="green">Percentage Change :2.3%</p>
</div>
<h1 class="dota2-hero-profile">Detail View</h1>
</div>
</div>
</div>
<!-- The div for the image -->
<div class="column1">
<div class="profile-image">
<img src="E:\FAST\Hit\E-sports-Lab\img\hero-profile\sf.png">
</div>
</div>
</div>
</div>