I've been studying various website source codes, but I'm struggling to achieve a specific effect. I want to have an image as the background that sits behind everything on the page. However, I don't want the entire background to be covered by this image; instead, I only want it to appear at the top like a banner. Examples of what I'm trying to achieve can be seen on sites like and . Currently, I have a textured background with the following CSS:
body
{
background-image: url("data:image/svg+xml;base64,..(base64 code)");
font-size: .80em;
font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
margin: 0px;
padding: 0px;
color: #696969;
}
Whenever I try adding an image in my CSS file, it ends up appearing above the main content div of my site rather than behind it like in the examples provided. I added a
<div class = "topb">
</div>
at the top of my MasterPage and then utilized
.topb
{
height: 243px;margin: 0px;padding: 0px;overflow: hidden;
background: url(/images/test2.jpg) no-repeat top center;
background-image:url(/images/test2.jpg);
}
in my CSS as a test, but being new to CSS and HTML development, I clearly lack experience. Any tips or suggestions?