Howlin1 Posted January 3, 2011 Share Posted January 3, 2011 For a college assignment I was required to make a website. It is after getting graded but I would like to continue to at least try to improve my site. One of the problems I had was the height of the sidebars. I solved the problem by using a javascript script, but I am wondering if it can be done with php? Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/ Share on other sites More sharing options...
BlueSkyIS Posted January 3, 2011 Share Posted January 3, 2011 Can WHAT be done in php? PHP is a server-side language. Javascript is client-side. But if you're dealing with the height of design elements, you might want to look into CSS. Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/#findComment-1154268 Share on other sites More sharing options...
Howlin1 Posted January 4, 2011 Author Share Posted January 4, 2011 I have used css to a certain extent. But what I would like to know is; how to change this to this Essentially I want the sidebars in the first link to extend down to the bottom of the users browser like in the second link. At the moment I have that working with some javascript and I want it done with php instead. Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/#findComment-1154428 Share on other sites More sharing options...
trq Posted January 4, 2011 Share Posted January 4, 2011 At the moment I have that working with some javascript and I want it done with php instead. PHP executes on the SERVER and has no idea what a browser is let alone its window size. Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/#findComment-1154431 Share on other sites More sharing options...
Howlin1 Posted January 4, 2011 Author Share Posted January 4, 2011 At the moment I have that working with some javascript and I want it done with php instead. PHP executes on the SERVER and has no idea what a browser is let alone its window size. I'm sorry, but how come you are able to get PHP to print to the users screen, what browser, browser version etc the user has? Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/#findComment-1154433 Share on other sites More sharing options...
trq Posted January 4, 2011 Share Posted January 4, 2011 I'm sorry, but how come you are able to get PHP to print to the users screen, what browser, browser version etc the user has? Certain information is sent to the server when a user makes a request. You can use this information to attempt to detect a users browser type. The size of your screen / browser window is not sent along with this information. Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/#findComment-1154436 Share on other sites More sharing options...
Howlin1 Posted January 4, 2011 Author Share Posted January 4, 2011 Ah okay thanks, I'm still pretty much a noob at php. Is there any other language it could be done in? I am asking because since I have it in javascript, users might have Javascript disabled or maybe their browser doesn't support javascript (for whatever reason). Or will I need to go to another forum and ask? Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/#findComment-1154444 Share on other sites More sharing options...
trq Posted January 4, 2011 Share Posted January 4, 2011 It needs to be done client side, and Javascript is the most widely supported client side language. That's it I'm afraid. What your asking can be done in css however, you shouldn't need any programming language. If your stuck, ask your question in our CSS help board. Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/#findComment-1154450 Share on other sites More sharing options...
FalseProphet Posted January 4, 2011 Share Posted January 4, 2011 Use CSS and HTML for this. Quote Link to comment https://forums.phpfreaks.com/topic/223278-height-of-a-sidebar-in-a-website/#findComment-1154458 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.