runnerjp Posted January 12, 2007 Share Posted January 12, 2007 hey guys ..put some images on my website and they keep resizing and i have no idea why because i havent set a size for them???any php code to stop this?? Quote Link to comment Share on other sites More sharing options...
emehrkay Posted January 12, 2007 Share Posted January 12, 2007 is the browser doign the resize? Quote Link to comment Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 any code? Quote Link to comment Share on other sites More sharing options...
runnerjp Posted January 12, 2007 Author Share Posted January 12, 2007 yes the browser is doing the resize and all i have put for code is[code]div style="position: absolute; top: 183px; left: 189px"> <img src="/image/training.jpg" /></div>[/code] Quote Link to comment Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 then you would either need to specify the width/height... or use some javascript to force it not to change... Quote Link to comment Share on other sites More sharing options...
runnerjp Posted January 12, 2007 Author Share Posted January 12, 2007 how would i use javascrpt to fice it not tio change Quote Link to comment Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 for example...[code]<s c r i p t>var images = document.images;foreach(images as image) image.style.width=image.width;</s c r i p t>[/code]not tested... but it should work... you'd also need to put that at the very bottom of the page... Quote Link to comment Share on other sites More sharing options...
runnerjp Posted January 12, 2007 Author Share Posted January 12, 2007 so would i put it in <php> or <script>?? Quote Link to comment Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 <script> Quote Link to comment Share on other sites More sharing options...
runnerjp Posted January 12, 2007 Author Share Posted January 12, 2007 tried it and it didnt work Quote Link to comment Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 then you'd want to specify height/width to them all :-P Quote Link to comment Share on other sites More sharing options...
runnerjp Posted January 12, 2007 Author Share Posted January 12, 2007 ok i will do that....thankyou Quote Link to comment Share on other sites More sharing options...
Jtech Posted January 12, 2007 Share Posted January 12, 2007 If you have a lot of images on your page putting width="" an height="" on every <img> could be tedious...if i was you i would use css to resize ur pics Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.