1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[HELP] How to automate resizing the website according to the browser ?

Discussion in 'HTML & JavaScript' started by vinayamb25, Mar 9, 2012.

  1. vinayamb25

    vinayamb25 Registered Member

    Joined:
    Nov 14, 2010
    Messages:
    85
    Likes Received:
    1,366
    Hi,
    I am working on wordpress theme, Guesthouse theme from themeforest to be specific and I want the website's width to resize itself automatically according to the user's screen resolution.

    How can I do that?

    P.S. I am a coding noob.
     
  2. lancis

    lancis Elite Member

    Joined:
    Jul 31, 2010
    Messages:
    1,632
    Likes Received:
    2,384
    Occupation:
    Entrepreneur
    Location:
    Milky Way
    Home Page:
    Use dynamic resizing in CSS, i.e. instead "width:640px" use "width:90%".
     
  3. vinayamb25

    vinayamb25 Registered Member

    Joined:
    Nov 14, 2010
    Messages:
    85
    Likes Received:
    1,366
    Ok, there are lots of parameters named "width" in there, for headers, for sliders etc etc. Which one should I change to resize the complete page or do I have to change each and everyone individually?
     
  4. lancis

    lancis Elite Member

    Joined:
    Jul 31, 2010
    Messages:
    1,632
    Likes Received:
    2,384
    Occupation:
    Entrepreneur
    Location:
    Milky Way
    Home Page:
    Each and everyone individually. They are all relative, i.e. width:90% DIV inside width:90% DIV will be sized as:

    90% * 90% = 81%
     
    • Thanks Thanks x 1
  5. vinayamb25

    vinayamb25 Registered Member

    Joined:
    Nov 14, 2010
    Messages:
    85
    Likes Received:
    1,366
    Thanks lancis, will try it. +rep given.
     
  6. Envyliciouz

    Envyliciouz BANNED BANNED

    Joined:
    Feb 5, 2012
    Messages:
    535
    Likes Received:
    220
    Install Firebug on your mozilla, in this way will be more easy to determine what exactly code is for a part of website.

    Good luck