I am working on a webpage where I have a container
nested inside my banner
both set to match the width of the body content.
The challenge I am facing is aligning a logo on the left side of the container (aligned with the left edge of the body content) and text on the right side of the container (aligned with the right edge of the body content).
#bannerRow {
width: 960px;
padding: 0;
margin: 0;
}
#headerName {
color: white;
font-size: 29px;
margin: 10px 0px 10px 0px;
float: right;
padding: 0;
}
#headerLogo {
float: left;
padding: 0;
}
<div class="banner" id="banner">
<div class="container" id="bannerRow">
<img class="bannerlogo" src="~/Content/uct-logo-white.png" id="headerLogo">
<h1 id="headerName"> Research Contracts and Innovation</h1>
</div>
</div>
Even though I have explicitly set the padding to 0, both the logo and the text still display some padding on their left and right sides. How can I eliminate this unwanted padding?