Currently, I am working on a design that includes an image, a header, and some text inside a box. However, I am facing an issue with aligning the header so that it appears above the rest of the text. The layout is not turning out as expected.
https://i.sstatic.net/d39Gr.jpg
Here is the HTML code:
<div class='Favorites'>
<div class='favorites_info'>
<div class="box">
<div class="picture">
<img src="Iconos/Help/favorites_help.png" alt="Fav" class="favor_help">
</div>
<div class="Messagebox_title">
<h1 >Favorites category
</h1>
</div>
<div class="Messagebox">
<h4 >You can select devices as favorites so you can get access to them quicker. Devices marked as favorites will be displayed in the "Favorites" category under the "Devices" tab.
</h4>
</div>
</div>
</div>
Below is the CSS for the two text elements:
.Messagebox_title {
vertical-align:middle;
display:table-cell;
text-align:center;
color: #555;
position: relative;
font-family: monaco, monospace;
font-size: 15px;
}
.Messagebox {
vertical-align:middle;
display:table-cell;
text-align:justify;
color: #555;
position: relative;
margin-left: 2px;
margin-right: 2px;
margin-top: 0px;
margin-bottom: 0px;
font-family: monaco, monospace;
font-size: 15px;
}