Drupal + G2 layout problems when sidebar on right
chanzero
Joined: 2005-10-19
Posts: 13 |
Posted: Wed, 2005-10-19 18:45 |
hello all, i have my g2+drupal integration working pretty well except for clean urls (which i'll tackle next) and strange layout problems when using any drupal theme with a right sidebar. (left sidebar themes seem to work fine...) my standalone gallery: my embedded gallery: in IE the drupal sidebar always starts below the gallery. in firefox it's at the top where it belongs but the width of sidebar seems to be out of control (see calendar & searchbox). any help is appreciated, thanks! |
|
Posts: 189
When I look at your G2 embedded site with Firefox DOM Inspector (a great tool by the way. If you don't have it I really recommend it) I see that the
content
div in the sidebar has 3 css rules associated with it:1) http://www.buzzscope.com/pcs/gallery2/themes/siriux/theme.css line 50
2) http://www.buzzscope.com/pcs/ line 2
3) http://www.buzzscope.com/pcs/themes/leaf/style.css line 194
Number 2) has a definition of width = 550px. This is likely to mess it up. I assume that you included this in your Drupal template somewhere as it is in the source of the page (
.content { width: 550px; }
) perhaps to get over the Siriux theme width. But doing this will also apply to the sidebar content unless you state that it should not.Part of the problem with the Siriux theme (and Drupal themes) is that their css tags are not very specific, so in this case
.content
is used in both. In Matrix theme the tags start with gbXX or gcXX etc so are unlikely to have been reused/redefined elsewhere. You can get around this by using something like:#gallery .content {...}
in your css file to make them more specific, but it can be tough to figure them all out. DOM Inspector is invaluable.
One option is to use the gallery.module from http://drupal.org/node/32393, which includes a css file which you can add Drupal/Gallery2 rules to, but it was designed with Matrix in mind, not Siriux.
Good luck -- CSS is always a pain.
Posts: 13
thanks for those clues KIZ, i will play with all of that stuff for sure.
i might even switch to matrix, because part of the reason i liked siriux was because the gallery "sidebar" stuff went on the bottom. but now i'm thinking what i'd really like to do is get rid of the drupal sidebar for the gallery pages, and perhaps just use matrix with a sidebar for the gallery. but i'm not sure how to edit the drupal template so it only affects a gallery page?
Posts: 189
If you want to turn off the sidebar in Drupal for gallery pages you do not need to edit any templates. One way to do it is to make the blocks in the Drupal sidebar not display in gallery pages. I do this on one of my sites to remove the right sidebar, but leave the left one. This can be done with admin/block -> configure and going to the "Page specific visibility settings" section and selecting "Show on every page except the listed pages." and put "gallery*" into the "Pages:" text field. This can be a bit of a pain if you have lots of blocks, but it does not require any Drupal changes.