make popup conform to image
So i'm attempting to make the classic thumb sized image gallery that when you click on an image it opens up a pop up using that images size and then when you click on it it closes, thus you can quickly access and view the full sized image, yet i find out that when Firefox loads it up, it adds like 5 pixels of space to the top and left margins making it ugly, of course when you click and hold it, it will then center the image, making it fill it all up. The code is written in php which just outputs html/javascript:
Code:
function imageMakeThumb($image) Code:
<a href="javascript:void window.open('./image.php?img=./projects/moo/images/atmaweapon.gif', 'contWindow', 'width=130,height=130');"> EDIT: Damn got it working like 10 minutes after this post. Just kept on clicking links from my search, i guess i got lucky this time. Should spend more then 30 mins last time, altough from my point of view, every time i post i get it resolved, so maybe i should just post anyways just to get it working faster, even though i have to excuse myself for my hasty post. Oh well, if anyone is interested, check this link - > http://www.siteexperts.com/tips/html/ts02/page1.asp , basically just tells you to add a css style, and some parameters in the <body> to get it working. |
I can't argue with the fact that it works, but unfortunately using deprecated attributes like "TOPMARGIN" probably isn't a good solution, either.
Please try something like this and see if it works: Code:
// head stuff http://www.zytrax.com/tech/css/workarounds.html Very, very highly recommended book, if you're interested in pursuing CSS ... and need good, practical advise on how to try to write good, conformant CSS in a world full of totally nonconformant browers: Professional CSS: Cascading Style Sheets for Web Design: http://www.bookpool.com/sm/0764588338 |
Quote:
I'm not too into CSS (only for practical use), because i enjoy more the PHP. I just know enough CSS, javascript and html to make things look ok, without being too fancy, but i have alot more fun in PHP, altough once i learn python i might start making sites in python :). Well i am just tempted to say, "best viewed in anything not internet explorer" and just stop makeing stupid hacks for them. I probably will, why support things not standard and inferior? Thanks for the advice, i'll be taking out the obsolete tags now :) followed by all my hacks to attempt to find the width and height in all non-compliant browsers (which usually doesnt work anyways). Man the posts i don't write in one sitting always seem less coherent ><. |
All times are GMT -5. The time now is 05:23 AM. |