Ich versuche, zwei divs nebeneinander zu haben, Bild links, Informationen rechts, und ich brauche sie zu stapeln (in der Mitte), wenn die Bildschirmgröße kleiner wird.Stapeln Divs nach Bildschirmgröße ändern?
Jedes Mal, wenn ich versuche, es zu beheben, bleiben die Bilder auf beiden Seiten des Bildschirms schweben, so dass sie nicht zentriert sind.
Wie kann ich dies entweder in CSS oder möglicherweise JQuery erreichen?
/* ------------------ team ------------------------------------*/
#team {
background-color: #0370AD;
background: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1)), #0370AD;
min-height: 115vh;
width: 100%;
text-align: center;
font-family: "Open Sans";
letter-spacing: 3px;
display: inline-block;
}
#team #teamheader {
text-align: center;
color: white;
font-size: 60px;
padding-top: 30px;
}
#team h2 {
width: 100%;
margin-top: 20px;
margin-bottom: 20px;
}
#team p {
color: white;
height: 20px;
font-size: 30px;
}
/* ------------------ profile divs ---------------------------*/
.profpics {
height: 400px;
width: 100%;
text-align: center;
margin-left: auto;
margin-right: auto;
padding-top: 100px;
border: 2px solid black;
}
.team_image {
height: 300px;
width: 550px;
float: left;
border: 2px solid black;
}
.team_image img {
height: 300px;
width: 300px;
border: 2px solid black;
}
.team_info {
text-align: center;
width: 600px;
height: 60%;
margin-left: 3%;
float: right;
border: 2px solid black;
}
.profpics h1 {
font-family: Oswald;
text-align: center;
width: 100%;
font-size: 50px;
letter-spacing: 3px;
color: white;
padding-top: 10px;
padding-bottom: 10px;
border-top: 4px solid black;
border-bottom: 4px solid black;
}
.profpics h2 {
font-size: 35px;
color: white;
}
<div id="team">
<h1 id="teamheader">Our Team</h1>
<!-- profile divs -->
<div class="profpics">
<div class="team_image">
<img src="https://x1.xingassets.com/assets/frontend_minified/img/users/nobody_m.original.jpg">
</div>
<div class="team_info">
<h1>Name</h1>
<h2>Chief Executive Officer</h2>
<p>email</p>
</div>
</div>
<div class="profpics">
<div class="team_image">
<img src="https://x1.xingassets.com/assets/frontend_minified/img/users/nobody_m.original.jpg">
</div>
<div class="team_info">
<h1>Name</h1>
<h2>Chief Technology Officer</h2>
<p>email</p>
</div>
</div>
Wenn es '* DRINGEND ist *' Ich schlage vor, Sie jemanden zu bezahlen, anstatt zu tun, um Ihre Arbeit. – PeeHaa
Werfen Sie einen Blick auf eine Medienabfrage – Pete
Zeigen Sie einige Screenshots, was genau Sie suchen! – aavrug