Bal Bal - 5 months ago 19
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'"
data-dojo-type="dijit/layout/ContentPane"
id="header"
class="dijitContentPane dijitBorderContainer-child
dijitBorderContainer-dijitContentPane
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

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

Add gutters: false to properties of the BorderContainer.

Comments