• rameshfdo

    (@rameshfdo)


    Hello,

    Im using zippy as my site theme and I need to add page margins for both left and right on all pages. Further I have static home page. Tried few ways which was described on forums but didn’t work. This is matter specially small screen devices.

    Thanks in advance !

Viewing 9 replies - 1 through 9 (of 9 total)
  • stephencottontail

    (@stephencottontail)

    Can you post a link to your site?

    Thread Starter rameshfdo

    (@rameshfdo)

    stephencottontail

    (@stephencottontail)

    If your theme has a built-in custom CSS option, use it; otherwise, get a custom CSS plugin and try:

    @media screen and (max-width: 480px) {
    body {
    margin: 0 15px;
    }
    }

    The @media line means that the rule will only apply when the browser window is 480px wide or smaller.

    Thread Starter rameshfdo

    (@rameshfdo)

    Thanks, though I have added custom css with above code I’m not getting expected results (cache cleared).

    stephencottontail

    (@stephencottontail)

    You have this line in your <head>...</head> section:

    <style type="text/css">body{margin:0px;}</style>

    which is overriding your custom CSS plugin. You should check your theme options and your other plugins to find out how that code was added so you can disable it.

    Thread Starter rameshfdo

    (@rameshfdo)

    Thanks stephen,

    Me too can’t find where this code is coming from, only place i found was under Zippy: admin-options.php

    $options[] = array(
    ‘name’ => __(‘Custom CSS’, ‘zippy’),
    ‘desc’ => __(‘The following css code will add to the header before the closing </head> tag.’, ‘zippy’),
    ‘id’ => ‘header_code’,
    ‘std’ => ‘body{margin:0px;}’,

    though I skipped it doesn’t make required changes.

    stephencottontail

    (@stephencottontail)

    As a temporary solution, you could use !important until you figure out what that function is for:

    @media screen and (max-width: 480px) {
    body {
    margin: 0 15px !important;
    }
    }

    Thread Starter rameshfdo

    (@rameshfdo)

    Thanks, for the time being it should be alright. But in some cases I noticed that static page is not arranging itself. This happens when window seizing.

    Hello @rameshfdo, I see that the problem was resolved on your site, I have similar problem on my site where slider arrows is going out of margins. Can you please tell me what you did to fix it.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Margins’ is closed to new replies.