what i need is a picture on the left of the panel then a title on the top right with list of text underneath the title. seems quite simple but cant seem to achieve it with the size or layout going haywire…
the layout i would like:
Panel Layout
using Visual Studio Code for both HTML and CSS
this is what i’ve just so far in HTML:
<div class="role">
<img id="role1" src="../images/owner.png" alt="Owner of Syndel">
<div class="box">
<ul>
<div class="picture">
<li><img src="../images/sinswordace150.png" alt="SinSwordAce's Profile Picture"></li>
</div>
<div class="title">
<li><h3>SinSwordAce</h3></li>
</div>
<div class="details">
</div>
</ul>
</div>
</div>
.role {
justify-content: center;
margin-top: 20px;
column-gap: 15px;
row-gap: 15px;
}
.box {
width: 900px;
height: 300px;
text-align: center;
border-radius: 20px;
justify-content: center;
border: 7px solid rgba(169, 169, 169, 0.250);
background: rgba(255, 255, 255, 0.050);
}
.picture {
text-align: left;
list-style-type: none;
}
.title {
text-align: right;
list-style-type: none;
}
2
Answers
wrap everything in one div and make a grid layout.
more about grid layouts here:
https://www.w3schools.com/css/css_grid.asp
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout
What you could also do is to seperate your layout into
div
s and then using flexbox rearrange into your desired layout.https://css-tricks.com/snippets/css/a-guide-to-flexbox/