CodeIgniter Forums
Fit HTML content according to screen resolution - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Fit HTML content according to screen resolution (/thread-55289.html)



Fit HTML content according to screen resolution - El Forum - 10-18-2012

[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)


Fit HTML content according to screen resolution - El Forum - 10-18-2012

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

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




Fit HTML content according to screen resolution - El Forum - 10-19-2012

[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 ;-)