MonteChristo
02-27-2008, 07:33 PM
from what i can tell this is quite a nuisance to achieve. i have a <div class="mainredblock"</div> tag that is 55% high and 100% wide. enclosed in this is another <div> tag that is 'restrictor' that keeps the content maxed at 1000px wide. inside this i want to insert an image that is 420px high, and make it center vertically within the 'container' div and float:right in the redbar so its flush left with the right edge of the 'restrictor' div. Right now the image floats right just fine but sticks to the top of the housing div box and will not get centered vertically. any ideas? thanks!
<div class="mainredblock">
<div class="restrictor">
<div class="homepageimage">
<a href="http://www.abc.com"><img src="globalimages/map.png" alt="" border="0"></a></div>
</div></div>
and the css:
.mainredblock .homepageimage {
float: right;
valign:middle;
}
.restrictor {
width: 1000px;
margin: 0 auto;
min-width: 1000px; width: expression (document.body.clientWidth < 1000? "1000px": "auto");
}
.mainredblock {
font-size: 1.1em;
width: 100%;
height: 55%;
margin: 0 auto;
background-color: #FF0000;
float: left;
min-height: 420px; height: expression (document.body.clientHeight < 420? "420px": "auto");
}
<div class="mainredblock">
<div class="restrictor">
<div class="homepageimage">
<a href="http://www.abc.com"><img src="globalimages/map.png" alt="" border="0"></a></div>
</div></div>
and the css:
.mainredblock .homepageimage {
float: right;
valign:middle;
}
.restrictor {
width: 1000px;
margin: 0 auto;
min-width: 1000px; width: expression (document.body.clientWidth < 1000? "1000px": "auto");
}
.mainredblock {
font-size: 1.1em;
width: 100%;
height: 55%;
margin: 0 auto;
background-color: #FF0000;
float: left;
min-height: 420px; height: expression (document.body.clientHeight < 420? "420px": "auto");
}