Hi all,
HOW CAN I DISPLAY IN THE CENTER OF AN IMAGE USING DIV OVERFLOW HIDDEN?
have searched the web for a good few hours now, usually manage to solve problems from google search. i would say i am a novice coder, couldnt write from scratch but can adapt and implement code.
well, i am a graphics person and love the way using DIV OVERFLOW: hidden
Code:
<div style="FLOAT: left; OVERFLOW: hidden; WIDTH: 100px; HEIGHT: 100px;
I have it so i can have blocks of neat squares displaying thumbnails of images as hyperlinks to the main image on another page.
well, i was happy enough when i used this to display book front covers, but now i want to focus on the center of an image or the right.
whereas the div overflow align's (displays) from the LEFT of an image.
HOW CAN I DISPLAY IN THE CENTER OF AN IMAGE USING DIV OVERFLOW HIDDEN?
have been browsing W3C for ages discovering SVG and preserve aspect ratio... err!
I have gone down this road without much understanding or knowledge of if this will work, but i might have been on the right lines,
Code:
<div style="FLOAT: left; OVERFLOW: hidden; WIDTH: 100px; HEIGHT: 100px; MARGIN_LEFT: -200px; MARGIN_RIGHT: -200px; TEXT-ALIGN: center;"><a href="http://
then the
Code:
<img src="image.png" style="WIDTH: 600px; HEIGHT: 460px" >
as you can see trying to MARGIN negative, can these work in div? i have even tried them in the img src style="... but no siuccess.
Please help me center the image when cropping with the OVERFLOW:hidden.
ps, it woudl be great if you could advise as to the codes cross browser and version compatibility.
I am also avoiding effecting the DIV from CSS in the
<HEAD> as the place i want to implement my gallery doesnt let me effect the head of a page, i can only place in the body. just i have seen many codes goign to the head and style tags.
If you can solve my trouble many thanks, really want to avoid making images into thumbnails of the parts of the image i want to show.
cheers
chris
also, hopefully i am clear enough in my dilemma. please ask if not. ;o)