0

I have a drupal page with three blocks beeing rendered and floated besides each other in a content area. In the middle of these, Drupal renders out a block called #block-system-main with an empty content div. It breaks my floats, and I have no idea where this div is coming from or how to remove it.

Any ideas as to what could cause this and how I can remove it?

3
  • Already asked here: drupal.stackexchange.com/q/17026/16495, and by the way, wouldn't it be simpler to fix your layout by CSS means?
    – Mołot
    May 9, 2014 at 9:23
  • No, I'm not rendering out anything with hook_page_alter(), atleast not as far as I know. Yeah I could remove it with CSS but it feels so dirty, it shouldn't be there.
    – Johan Dahl
    May 9, 2014 at 9:29
  • The solution could also be moving the block rendered by Drupal after your blocks. How are you creating the blocks? If it is by code, it would help to see your code.
    – apaderno
    May 9, 2014 at 16:09

1 Answer 1

1

I dont know where it comes from. Probably best would be if you can find that. But if you want to quick fix it. You could unset it in page preprocess

function YOURTHEME_preprocess_page (&$variables, $hook) {
  unset($variables['page']['some_region']['block_id']);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.