PDA

View Full Version : boxWrap and css issue.



danh2000
28 May 2007, 7:11 PM
Hi,

I think this is probably a bug... when I pass a class name ('box-blue') to the boxWrap function, the box doesn't render.

Here is the markup that is generated (well, some of it):



<div class="x-box-blue-ml">
<div class="x-box-blue-mr">
<div id="ext-gen34" class="x-box-blue-mc">
<div id="loginFormBox">
<form id="ext-gen59" class="x-form" method="post">
<div id="ext-gen35" class="x-form-ct x-form-label-right">
<div class="x-form-item">
</div>
<div class="x-form-clear-left"/>
<div class="x-form-item">
</div>
<div class="x-form-clear-left"/>
<div id="ext-gen61" class="x-form-clear"/>
</div>
<div class="x-form-btns-ct">
</div>
</form>
</div>
</div>
</div>
</div>
<div class="x-box-blue-bl">
<div class="x-box-blue-br">
<div class="x-box-blue-bc"/>
</div>
</div>
</div>


However this doesn't match the definitions in box.css:


.x-box-blue .x-box-bl, .x-box-blue .x-box-br, .x-box-blue .x-box-tl, .x-box-blue .x-box-tr {
background-image: url(../images/default/box/corners-blue.gif);
}

.x-box-blue .x-box-bc, .x-box-blue .x-box-mc, .x-box-blue .x-box-tc {
background-image: url(../images/default/box/tb-blue.gif);
}

.x-box-blue .x-box-mc {
background-color: #c3daf9;
}

.x-box-blue .x-box-mc h3 {
color: #17385b;
}

.x-box-blue .x-box-ml {
background-image: url(../images/default/box/l-blue.gif);
}

.x-box-blue .x-box-mr {
background-image: url(../images/default/box/r-blue.gif);
}

Am i missing something blindingly obvious or is this a bug.

Thanks in advance,

Dan

jack.slocum
28 May 2007, 7:23 PM
You want to pass 'x-box', not 'x-box-blue'. Then the element that contains the box has a class on it 'x-box-blue'.

danh2000
28 May 2007, 7:30 PM
Aaah... got it.

Thanks for the quick reply.

I presumed (wrongly) that because 'x-box' is the default class, passing an alternate class param was the way to go.

Sorry for wasting your time.

Dan