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

ACP Styling

Discussion in 'Styling and Customization Questions' started by ragtek, Jul 11, 2012.

  1. ragtek

    ragtek Guest

    I've replaced my acp header with an own
    Because of the new header size, i needed to change the navi and content padding.


    I changed
    Code:
    #body
    {
    padding-top: 100px;
    position: relative;
    }
    hi.PNG
    which changed it only for the navi

    Why doesn't this set the padding-top for the contentcontainer too?

    I've done it via

    Code:
    $contentContainer.css('padding-top', '10px');
                $body.css('padding-top', '90px');
    and it looks nice
    hi2.PNG

    but i'm trying to understand why i had to set 10 & 90 px.. (got the values with trying different values:D )
     
  2. Arty

    Arty Well-Known Member

    #contentContainer is absolutely positioned, you should change "top", not "padding-top" and then value would be the same as padding-top for #body.

    Why did your code seems to work? Because #contentContainer already has 75px offset set by "top", so by adding 10px padding you've lowered container's content by another 10px, making it 85px. You are 5px off correct value, but you didn't notice it because there is enough spacing from top of container to navigation links not to notice the difference.
     
    ragtek likes this.

Share This Page