Please can someone help me….

I am trying to understand how and why certain sections within admin extend beyond the actual width I have specified in the parent containers. The header, left block and content in total are 800px, but certain forms and tables in admin stretch beyond the specified size and I don’t understand why. I have looked at the drupal.css but have not been able to locate the problem. I would really appreciate some help.

Here is the link: http://blog.visitorsstudio.org/ (or should i post the code?)

Comments

dman’s picture

If the tables are too wide, then they are too wide.
If I can guess what you mean (post a screenshot if you want) then some of your admin pages (maybe blocks? or logs?) have content that just can't squash any further. 3 form elements in a row cannot be any narrower than the space that those 3 form elements need.

Thus, some attempts at pure-css layouts will continue to fail. :(

I've hacked around this problem by setting overflow:hidden on my left column and overflow:auto in the middle. It's not pretty, but it stops the worst of the layout problems ... and introduces a few more.

.dan.
How to troubleshoot Drupal | http://www.coders.co.nz/

zara-1’s picture

Maybe there is a way for me to make the individual elements of the table smaller. I think there is still a little space left, they are not so tight. It seems the table headers in the input format section, under admin, pushes the table out, rather than the actual content of the table. And…in the logs section it could be the message element that pushes the width out (I noticed some of the links are very long). So far I have been focusing on the actual form or table widths, thinking that if I changed them, everything else within them would too.

I posted some pics at flickr (only because I couldn’t see how to post them here).

http://www.flickr.com/photos/z9r9/

ixlr8’s picture

I had the same problem. If you want to make your tables smaller you need to make the text smaller in the tables. That will move it over. Somewhere in the Drupal.css file there are definitions on the width of those tables. You don't need to go into that CSS file, as the css for the template overrides the drupal.css file. So just add something like this:

td, th {font-size:11px; font-family: whatever fonts you use}

That will make your font smaller, and will reduce the size of your text.

Michael

zara-1’s picture

Thanks. That worked a treat.

If only I had thought about that sooner, rather than making it more complicated.

zara

mlsamuelson’s picture

I solved this issue for a site I did by adding the following to my page.tpl.php file, just after my main stylesheet declaration:

<?php 
// write this css rule if we're on an admin page (detected via url) so we can 
// overwrite the original CSS rule and widen the page
if (arg(0) == 'admin') { ?>
  <style type="text/css"> 
    div#container{width:950px;}
  </style>
<?php } ?>

The original width for the div#container in my design was 750px.

Of course it will depend on your css, how it behaves with a rule rewrite. In my case, the resize of the div worked very well.

Moral of the story is, if rewriting some CSS can accomodate the width needs of the admin section, the method I shared will do the trick.

Michael Samuelson
Idaho Commission for Libraries
and dotted i design

mlsamuelson

zara-1’s picture

I am working from the blue marine template and that doesn’t use a page.tpl.php file.

How would I use your method with the blue marine template?

Zara

mlsamuelson’s picture

In 4.7, the Bluemarine theme has a page.tpl.php file.

I'm guessing you're on a version of Drupal before the PHPtemplate theme engine became the default theme engine. If that's the case, you could use the method I noted, I'm guessing, in the main template file for the theme.

Michael Samuelson
Idaho Commission for Libraries

mlsamuelson