Hi All,
I have a problem with my web page. I'm floating some content to the left so the image below can move up to the right. The content and image are contained in a div with a height set to 100%. When I remove the height or decrease it, the image moves down the page to where it began. Either way, the gap where the image started never decreases. I'm aiming for it to just go away so that the content reachers the footer.
This occurs more noticably in the smaller width view using the media query.
I assume it has something to do with some percentages/height or whatnot that I've set earlier but I can't seem to fix the problem.
The html source:
<div id="page>
<div id="content">
<div id="about_content">
blah...
</div>
<img src="image.jpg" id="about_img"></div>
</div>
The css:
html, body
{
margin: 0;
padding: 0;
color: #555;
font: normal 1em Arial,Helvetica,sans-serif;
height: 100%;
width: 100%;
}
#page
{
margin: 0;
background-color: white;
height: 100%;
width: 100%;
}
#content
{
padding: 0.5%;
height: 100%;
}
#content p
{
font-size: 1em;
height: 100%;
}
#about_content
{
width: 40%;
padding: 20px;
margin-left: 10%;
float: left;
}
#about_img
{
max-width: 25%;
margin-right: 15%;
float: right;
position: relative;
bottom: 10%;
}
@media screen and (max-width: 768px) {
/* reset all content areas to full width of media query */
#page, #header, #footer, #content {
width: 768px;
}
#about_content {
margin-left: 5%;
}
#about_img
{
margin-right: 5%;
max-width: 45%;
bottom: 55%;
}
}
Thanks for any help offered.