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?? Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/ Share on other sites More sharing options...
emehrkay Posted January 12, 2007 Share Posted January 12, 2007 is the browser doign the resize? Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159110 Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 any code? Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159113 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] Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159115 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... Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159124 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 Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159146 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... Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159150 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>?? Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159162 Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 <script> Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159170 Share on other sites More sharing options...
runnerjp Posted January 12, 2007 Author Share Posted January 12, 2007 tried it and it didnt work Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159172 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 Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159182 Share on other sites More sharing options...
runnerjp Posted January 12, 2007 Author Share Posted January 12, 2007 ok i will do that....thankyou Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159186 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 Link to comment https://forums.phpfreaks.com/topic/33895-any-chance-of-help/#findComment-159444 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.