I want to apply the following css styles
#header {
color: #333;
width: 900px;
float: left;
padding: 10px;
border: 1px solid #ccc;
height: 150px;
margin: 10px 0px 5px 0px;
background-image: linear-gradient(to top, #CACACA 0%, #EFEFEF 100%);
}
Within a div element, I have two elements.
<div id="header">
<p:graphicImage value="/dbimages/#{accountManagedBean.imageId}" styleClass="imageResizeAccountInfo"/>
<h:outputLabel value="#{accountManagedBean.account.userName}" style="font-size:40px"/>
</div>
One of them is an image, and the other is text. I aim to align the image on the left side while centering the text both vertically and horizontally.
The resulting HTML code looks like this:
<div id="header">
<img id="mainForm:j_idt164" src="/ui/dbimages/2805" alt="" class="imageResizeAccountInfo" />
<label style="font-size:40px">dvargo</label>
</div>
Currently, they appear next to each other. As a beginner in css, I have put together this design using composition technique so far.
Is there a way to achieve the desired layout?