I have a site built with the Newsflash theme. When I check it with YSlow, I am asked to minify the JS and CSS. I can take care of most of it except it looks like there are some Inline Style Tags that. Is it possible to move these to a CSS?

I believe that YSlow is complaining about:

      <style type="text/css">
    #page {
      width : 900px;
    }
    </style>
        <style type="text/css">
    body.sidebar-left #main {
      margin-left: -210px;
    }
    body.sidebars #main {
      margin-left: -210px;
    }
    body.sidebar-left #squeeze {
      margin-left: 210px;
    }
    body.sidebars #squeeze {
      margin-left: 210px;
    }
    #sidebar-left {
      width: 210px;
    }
    </style>
        <style type="text/css">
    body.sidebar-right #main {
      margin-right: -210px;
    }
    body.sidebars #main {
      margin-right: -210px;
    }
    body.sidebar-right #squeeze {
      margin-right: 210px;
    }
    body.sidebars #squeeze {
      margin-right: 210px;
    }
    #sidebar-right {
      width: 210px;
    }
    </style>
        <style type="text/css">
    body {
      font-family : Arial, Verdana, sans-serif;
    }
    </style>

Any idea where this code comes from? Can it be moved into a CSS?

Comments

kisugiai’s picture

Status: Active » Closed (fixed)

this code comes from the page.tpl
is calculates the width of your page and sidebars

you can remove it
and add

    body.sidebar-left #main {
      margin-left: -210px;
    }
    body.sidebars #main {
      margin-left: -210px;
    }
    body.sidebar-left #squeeze {
      margin-left: 210px;
    }
    body.sidebars #squeeze {
      margin-left: 210px;
    }
    body.sidebar-right #main {
      margin-right: -210px;
    }
    body.sidebars #main {
      margin-right: -210px;
    }
    body.sidebar-right #squeeze {
      margin-right: 210px;
    }
    body.sidebars #squeeze {
      margin-right: 210px;
    }

in the styles.css and you have to find #page and change the width:95% to width:900px
this will set the page to
left and right sidebar 210px and page width to 900px

but you will loose the settings function you can't set the width and fonts over the settings page anymore

closed -- issue fixed for 2 weeks with no activity.