In a fixed width format, basically pushbutton set to a width of 800, I'm seeing the div.admin .right being rendered below and to the right of the left admin panel in FireFox 2.
One way to fix this is to make a change to admin.css to change the margin-left and margin-right to be a % instead of fixed 1em.
div.admin .left {admin.css (line 24)
float:left;
margin-left:1em; /* change this to 1% since the width's are specified in %'s */
width:47%;
div.admin .right {admin.css (line 29)
float:right;
margin-right:1em; /* change this to 1% since the width's are specified in %'s */
width:47%;
}
I'm new to CSS and I'm curious about the best practices. Is it OK to mix a fixed margins and %age widths or does this normally cause problems?
Thom K
I sent this earlier using the wrong email address. oops.
Hi Thomas,
I did a few quick calculations. 1em depends on the font and font-size being used, but it is usually ~16px (the width of the M character in that font/size).
The admin.css using these widths and margins (47% + 47% + 16px + 16px) can cause problems if the width of the content div is ~533px or less. If you've got 2 sidebars on a 800px wide layout, you can easily be less than 533px in your content area. One solution would be to turn off all the blocks in one side bar by specifying "admin/*" in the "Show on every page except the listed pages" option of those blocks.
If you need to modify the CSS, the best practice is not to change any of the core Drupal files (it makes it easier to upgrade your Drupal install), so you should make a copy of the pushbutton theme, put it in /sites/all/themes/mypushbutton directory and then add these lines to style.css:
div.admin .left { margin-left: 10px; } div.admin .right { margin-right: 10px; }
Regards, John
John Wilkins Albin.Net : friendly web development 480.598.3338 : http://www.albin.net
On Apr 14, 2007, at 7:51 AM, Thomas wrote:
In a fixed width format, basically pushbutton set to a width of 800, I'm seeing the div.admin .right being rendered below and to the right of the left admin panel in FireFox 2.
One way to fix this is to make a change to admin.css to change the margin-left and margin-right to be a % instead of fixed 1em.
div.admin .left {admin.css (line 24)
float:left;
margin-left:1em; /* change this to 1% since the width's are specified in %'s */
width:47%;
div.admin .right {admin.css (line 29)
float:right;
margin-right:1em; /* change this to 1% since the width's are specified in %'s */
width:47%;
}
I’m new to CSS and I’m curious about the best practices. Is it OK to mix a fixed margins and %age widths or does this normally cause problems?
Thom K
themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes