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

Can some one please help on this code.

Discussion in 'HTML & JavaScript' started by saber210, Sep 29, 2013.

  1. saber210

    saber210 Supreme Member

    Joined:
    Sep 1, 2011
    Messages:
    1,358
    Likes Received:
    500
    Location:
    -
    I got this wordpress theme, and it always set the container width to 1200px. I dont know why.

    I use the masonry type of wordpress theme and this is the jquery code:

    http://pastebin.com/kzHQ8FJp

    This is the css.

    http://pastebin.com/7ht4UpsS

    the container is always set to 1200px, i dont know why. I want to set it to 950 only. I think the javascript/jquery is responsible on this thing.

    <div id="container" style="position: relative; width: 1240px; height: 595px; ">

    If some one please help me?

    Thanks!
     
  2. Fryyy

    Fryyy Newbie

    Joined:
    Aug 21, 2013
    Messages:
    26
    Likes Received:
    15
    In style.css:
    CHANGE #container,#archives,#header-box{width:1200px}
    TO #container,#archives,#header-box{width:950px}

    EDIT:

    There are a lot of occurances of "1200px" in there.
    I would personally change EACH.

    ------------------- ...

    At the minimum, I would change my original "CHANGE"

    ------------------- ...

    If you do however want to change only #container, then:

    CHANGE #container,#archives,#header-box{width:1200px}
    TO #archives,#header-box{width:1200px} #container {width: 950px}


    /\ That will probably make things look funny.
     
    Last edited: Sep 29, 2013
  3. amandatorey

    amandatorey Newbie

    Joined:
    Sep 30, 2013
    Messages:
    6
    Likes Received:
    1
    Have you considered using SCSS or LESS? They're supersets of CSS with variable support (so, like the poster above me mentioned, you don't have to write '1200px' repeatedly), nested selectors, etc.
     
  4. Dhruv11

    Dhruv11 Newbie

    Joined:
    Oct 21, 2012
    Messages:
    33
    Likes Received:
    12
    Change the property of #container in media(min-width:1300px){#container,#archives,#header-box{width:1200px}}
     
  5. wpexpert1992

    wpexpert1992 Newbie

    Joined:
    Oct 11, 2013
    Messages:
    3
    Likes Received:
    0
    You need to change the property of the #container in the stylesheet to 950 px from 1200px where ever it occurs.
    Or you can explicitly declare in your JS #container property to 950px,

    Both will solve your problem.