I tried using .sidebars-1 .page-admin #content but that didn't work.

Comments

Deepika.chavan’s picture

Hi,
if you wanna increase the width of all administration pages, then replace the code of function 'phptemplate_body_class($left, $right)' with the following code in template.php file:

function phptemplate_body_class($left, $right) {
  global $user;
  $arg0 = arg(0);

  if ($left && $right) {
    $class = 'sidebars-2';
    $id = 'sidebar-side-2';	
  }
  else if ($left || $right) {
    $class = 'sidebars-1';
    $id = 'sidebar-side-1';
  }
  
  if($user->uid == 1 && $arg0 == 'admin'){
    $class = $class . ' admin-page';
  }  

 if(isset($class)) {
    print ' class="'. $class .'"';
  }
  if(isset($id)) {
    print ' id="'. $id .'"';
  }
}

Now, add following css code in local.css file:

.admin-page #wrapper {
 width:90%; 
}

OR if you wanna increase the width of the content of pages created by admin then
1. add following function in template.php

function danland_preprocess_page(&$variables) {
   if($variables['node']->uid == 1){
    $variables['node_class'] = 'admin-wrapper';
  }
  else {
    $variables['node_class'] = 'wrapper';
  }
}

2. Add a div before <div id="wrapper"> and complete it after </div> <!-- end wrapper --> in page.tpl.php file:
i.e. code to be added in page.tpl.php to add a div is :
<div class="<?php print $node_class; ?>">

3. Add following css in local.css file :

.admin-wrapper #wrapper {
  width:90%; 
}

.wrapper #wrapper {
  width: 950px;
}

Please clear cached data.. (you can also change the width of sidebar and content instead of increasing the width of wrapper.)
HTH!!

Rgrds,
Deepika Chavan.

danpros’s picture

Status: Active » Closed (fixed)

Thanks Deepika.chavan,

I will close this one.