Hi there,
I am loosing my hairs into setting up a css valid way of centering an image in its div container. This container has never the same height as he is stretched trough Javascript to fit the browser window minus 100px at the top used for a nav bar.
Little googlings and i found this great CLflVa script on tek-tips.
This permits to stretch the container div.
Now i'm sure a few more lines and we could center the image
vertically inside this div
<div id="wrapper">
<img src="images/22.jpg" height="232" width="283"/>
</div>
<script language="javascript">
<!--
function changeDivHeight() {
var h = document.documentElement.clientHeight;
document.getElementById('wrapper').style.height = h + "px";
}
onload = changeDivHeight;
onresize = changeDivHeight;
-->
</script>
If someone knows or if cFlaVA is around...
Thanks in advance.
I am loosing my hairs into setting up a css valid way of centering an image in its div container. This container has never the same height as he is stretched trough Javascript to fit the browser window minus 100px at the top used for a nav bar.
Little googlings and i found this great CLflVa script on tek-tips.
This permits to stretch the container div.
Now i'm sure a few more lines and we could center the image
vertically inside this div
<div id="wrapper">
<img src="images/22.jpg" height="232" width="283"/>
</div>
<script language="javascript">
<!--
function changeDivHeight() {
var h = document.documentElement.clientHeight;
document.getElementById('wrapper').style.height = h + "px";
}
onload = changeDivHeight;
onresize = changeDivHeight;
-->
</script>
If someone knows or if cFlaVA is around...
Thanks in advance.