Hey Michael,
2008/6/28 Michael Ivanov <[EMAIL PROTECTED]>:
> Hallo,
>
> Is there any way to disable or override CSS code, hardwired in WDialog?
> The actual code places top left corner fo dialogue window at the center
> of the screen instead of centering the dialogue. I created css clause
In fact, the actual code places the dialog window in the center of the
window, but using the (usually violated) assumption that the dialog is
200 pixels wide and 100 pixels high. The problem is that it impossible
to center the dialog (vertically) in CSS only without knowing the
size. You can only do it when you either set the size explicitly (but
that is rarely what you want to do), or measure the size using
JavaScript. Thus, we could center it exactly when JavaScript is
available, and I'm adding it to my TODO list.
> that positions the dialogie more acceptable, but the only way I can use
> it is by preloading a special version of the library, that has CSS code
> commented out.
You should be able to override all the internal CSS code, by
overriding the selectors from your own CSS files:
- use WApplication::useStyleSheet() to load your own CSS file
- for WDialog, it is not documented, but you will want to add
declarations like :
div.Wt-dialogwindow {
margin-left: -XXXpx;
margin-top:-YYpx;
}
where XXX is half the dialog width, and YY half the dialog height.
This will change the setting for all dialogs though.
Regards,
koen
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
witty-interest mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/witty-interest