Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ghostchild

macrumors 6502
Original poster
Jun 17, 2007
355
0
Hey all here is my page I am working on. As you can see the image won't scale, I want to scale it by height but it won't let me. Please help me. I've tried for a month already.... :( I got it to work on Safari though.

thing is that I simply coded it here and it works both in safari and firefox, but it doesnt work with my code i have now......

Main problem is that Firefox is ignoring and overriding my div container and allowing the image within the container to be bigger than the container itself....

The point of this is not having to shrink all my photos.

John
 
I looked at it and played with some ideas, but didn't get it to quite work out. Would you be willing to use a JavaScript solution?

Edit: OK, worked it a little more with my own stuff.

HTML:
HTML:
<body>
<div id="content">
<img src="test-tall.jpg" alt="" />
<!-- end content --></div>
</body>
CSS:
Code:
#content {
 position: absolute; top: 0; left: 0;
 height: 100%; width: 100%;
}
img {
 display: block;
 height: 100%; width: 100%;
}
The CSS here are the essential pieces.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.