Alexhoward Posted October 26, 2008 Share Posted October 26, 2008 Hi Guys Bit embarrassed to ask this but... I’m creating a web page in 800 X 600, and I’d like to add an extra column each side that will fill the remained of the screen when view on a higher resolution. At the moment I have a table with 3 columns set at 100%, the centre column is set at 800px However I would like the outside 2 to shrink down to nothing when viewed on 800 X 600, and expand to whatever when viewed on a higher resolution, but this doesn’t seem to be happening Could someone please tell me where I’m going wrong… Thanks!! Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/ Share on other sites More sharing options...
kenrbnsn Posted October 26, 2008 Share Posted October 26, 2008 Code? Also, does this really have anything to do with PHP or is it just CSS and/or HTML? Ken Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675008 Share on other sites More sharing options...
Alexhoward Posted October 26, 2008 Author Share Posted October 26, 2008 supposes it's html.... but this forum has been such a great help in the past i thought i'd ask here again.. say you had : <table width="100%"> <tr> <td></td> <td width="800"></td> <td></td> </tr> </table> i would like to only show the centre column on a resolution of 800 X 600, and the other two to start coming in on a higher resolution... but this doesn't seem to work... Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675010 Share on other sites More sharing options...
laPistola Posted October 26, 2008 Share Posted October 26, 2008 you should be using div's really, infact if these side columes are to be filled with just a continued repeating image then just have it as the background repeated on the y or x axis or both. Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675011 Share on other sites More sharing options...
TheFilmGod Posted October 26, 2008 Share Posted October 26, 2008 This is actually really complicated. You can use php to check what resolution the user uses and parse the proper code. there really isn't any easy way around it. Css isn't that powerful at this time. Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675042 Share on other sites More sharing options...
emehrkay Posted October 26, 2008 Share Posted October 26, 2008 I think that the film god is wrong on this one. Design your site at 8x6, center the site (i assume it is centered), in your css, create an image that is repeated in the background body{ background: transparent url('/image/to/repeat.jpg') top center repeat-y; } Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675100 Share on other sites More sharing options...
TheFilmGod Posted October 26, 2008 Share Posted October 26, 2008 I think that the film god is wrong on this one. Design your site at 8x6, center the site (i assume it is centered), in your css, create an image that is repeated in the background body{ background: transparent url('/image/to/repeat.jpg') top center repeat-y; } That would work IF a background image on the left and right hand side would suffice. If he wants actual content (he mentioned something about tables here and there) then you need to use php. Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675227 Share on other sites More sharing options...
haku Posted October 27, 2008 Share Posted October 27, 2008 The film god is right on this one. It can't be done with only html or css. It will require a php solution (actually, javascript could work as well, but I wouldn't recommend it for this situation). Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675346 Share on other sites More sharing options...
emehrkay Posted October 27, 2008 Share Posted October 27, 2008 What he wants[how i read it] is for a background image to be displayed when the browser is wider than 800. No JS needed, No PHP needed. Pure css with a centered image on the background. Maybe I dont understand what he is aking for Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675368 Share on other sites More sharing options...
Alexhoward Posted October 27, 2008 Author Share Posted October 27, 2008 Hi Guys, Thanks for replying! apologies that i've only just managed to get back to the forum. I got it working by creating a 1px wide image, and stretching it by 100%. The problem seemed to be that html will stretch an image beond it's original size, but will not shrink it any lower. thanks again for your help! Quote Link to comment https://forums.phpfreaks.com/topic/130168-solved-probably-the-easiest-question-ever/#findComment-675481 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.