Bal Bal - 1 year ago 190
CSS Question

Dojo claro css applying absolute positioning to ContentPane elements

I'm using dojo 1.8 and don't want any padding in my bordercontainer / contentpane layout. The problem is, it seems when I add the claro css file, instead of just applying class styles, the div's i'm using for my content panes get styles applied inline. It almost seems like this is being done programmatically, but only when I add the css file.

For instance, the contentpane I use as my header looks like this:

<div data-dojo-props="region: 'top'"
class="dijitContentPane dijitBorderContainer-child
dijitBorderContainerPane dijitAlignTop"
title="" role="group" widgetid="header"
style="left: 5px; top: 5px; position: absolute; width: 1387px;">

It adds the style="left: 5px; top: 5px...." which I'm pretty sure precludes me from just overriding any type of padding or margin setting with css. I want my content panes to not have any padding or "virtual" padding by using absolute positions like this. How can I still use claro but prevent this behavior?

Answer Source

The 5px comes because you have gutters set to true on the BorderContainer.

Add gutters: false to properties of the BorderContainer.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download