panel flexible size does not really working

Events happening in the community are now at Drupal community events on www.drupal.org.
tegila's picture

When i try to put 100% width to any column of a panel pages, they put aways something near 99, 99.5, 99.9.
Anybody knows why and where can i go to change this?

I think that are happen because some wrong calculation inside module.

Some time this can appear insignificant but are making all my layout crash.

Wrong Generated CSS:

div.panel-flexible div.panel-row-1 div.panel-col-1 { width: 99%; }

So.. i have tried override css tag but the generated css are put inside the main layout file. So, i cant do this.(i think)

ty in advance

Comments

This is because IE chokes

merlinofchaos's picture

This is because IE chokes pretty hard on 100% width, so it actually resizes things down a little.

If you need things to be that exact, you should probably create your own layout. It's not too complex to do this.

Working now

tegila's picture

I am using firefox, and grab that values from firebug.

After some work i found where the major changes are happen and causing this.

at modules/panels/layouts/flexible/flexible.inc; line 321; i found:
$reduce = 1 / $settings["row_$row"]["columns"];

the $reduce factor are being used at line 340 as a factor reduction to make that all columns don't use more than 100% of the weight
$css .= "$idcss div.panel-row-$row div.panel-col-$col { width: " . ((($settings["row_$row"]["width_$col"])) - $reduce) . $settings["width_type"] ."; }\n";

another things inside flexible.css in the same folder have a fixed width of 99.9%, i changed they too.

I am working with Drupal 6 and Panels 2 and now everything is going fine again, but maybe somebody can suggest another way to do that without change the source code of panels module.

The major changes are done over function theme_panels_flexible($id, $content, $settings).

so.. i think that is all. Another way to solve this maybe interest of another people too.

The chances of your layout

merlinofchaos's picture

The chances of your layout breaking on IE with 99.9% are high.

why?

tegila's picture

Now i understand what you are trying to say. But, what can happen to IE with width 100% ?
Im looking to my layout at IE 7 and everything is fine. (at now)

About your possible solution of create a custom layout, are you saying about do this with panels or with template engine?

0,01% are doing my layout look ugly. I want to solve this without create another problem. =)

Try IE6. Dave

dwees's picture

Try IE6.

Dave

What about making this a

honigferd's picture

What about making this a setting?

IE6 is dying, let it rot. IE6 users are the minority and by now used to looking at broken sites.

I'm seeing a lot more sense in the approach of fixing this for the majority of users and letting the minority folks who still want to hold on to IE6 deal with fixing it for their local cases.

Using flexible layouts would be significantly more easy if one wouldn't have to change the CSS in tons and tons of instances because it wants to convince me that 99.9% are 100% (which, simply, isn't true :( )

Panels

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: