CodeIgniter Forums

Full Version: Fit HTML content according to screen resolution
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Beginers[/eluser]
Hi All,

how do i make my page adjust its content according to the user's screen resolution. I had created a website on my pc it's pretty good looking but when i visit it in another pc the screen resolution is too much height compared to my computer screen resolution. How i do make my site resize its content according to current user's screen resolution? Please help. do i need to use css ? or javascript? or jquery? (sorry for bad english)

El Forum

[eluser]solid9[/eluser]
Just play with CSS.

Here is a good tool site for you,
http://csseasy.com/

El Forum

[eluser]boltsabre[/eluser]
Oh dear...

Do NOT use js/jQuery for this, it should all be done in CSS!!!

Stay away from fixed widths/height, use percentage and stuff like that. Research "css media queries" as well.

This will take a bit of practice, the one thing to keep in mind is that you will never get it to display 100% the same on all browsers, especially in combination with a variety of different screen resolutions!

Suggestion, just start playing around with some different very basic designs (try just a header one colour, a footer another colour, and two or three columns all different colours again, with just a little text in each), and master that. Once you've got the hang of it you can start playing around with some more complex designs and stuff.

Another thing... RESEARCH ON GOOGLE... you would have found many 1000's of answers to your question if you did the research instead of asking on here ;-)