schmunk
(Schmunk)
September 10, 2009, 10:29pm
1
Hi,
basically that’s it:
div.yiiForm
{
width: auto;
}
div.yiiForm div.span div,
div.yiiForm div.span label
{
float: none;
margin-left: 0;
display: block;
}
I would suggest not to limit width of ‘.yiiForm’.
And a third class ‘span’ would be nice, this changes the form field back from column style display into one “below the other”.
Best regards,
schmunk
pestaa
(Pestaa)
September 12, 2009, 11:32am
2
The auto-width doesn’t limit the width of the form, it basically means it won’t fill up the whole screen (or, to be more precise, the parent container).
And I believe you can easily overwrite CSS rules with the !important key. So
div.yiiForm div.span div,
div.yiiForm div.span label
{
display: inline-block !important;
}
in your page might do the trick you’re looking for.
schmunk
(Schmunk)
September 13, 2009, 1:33pm
3
Hi pestaa,
thanks for your reply. Lets me think into another direction.
The previous post was meant only as a proposal, I stumbled upon a few CSS problems while integrating different modules into my app.
What I wanna say is: There are no guidelines concerning module user-interfaces
Please consider writing some style & interface guidelines for modules.
It will give the extension repository a huge boost, because modules from different sources would look much better together.
Just my 2 cents.
Best regards,
schmunk
PS:
Could you also help me here?
schmunk
(Schmunk)
September 13, 2009, 2:59pm
4
To give a little bit more brief information …
I am currently including srbac extension in my app.
This exentsion has its own css class which modifies div.yiiForm and adds a new class div.srbac to the css file.
The former, because it hasn’t enough space, that’s the reason for my first post. And the latter, because it need a large .yiiForm .
If every module does it this way, it would be a real pain to get a consisent user-interface, which is very imporant in my opinion.
I think there should be a set of yiiCSS classes which modules should use in a preferred way.
See Apple Human Interface Design Guidelines, hey we don’t need it that large
Second, all modules should use a configurable path for all style files, otherwise they are not themeable.
Or am I missing something completely here, what’s the yii-way of themeing modules?
Best regards,
schmunk
qiang
(Qiang Xue)
September 14, 2009, 11:35pm
5
Yes, the CSS styles included in the skeleton webapp are by no means to be standard. Since I am not a CSS expert, I hope some CSS gurus can help to propose a preferred way of using CSS in Yii applications.
schmunk
(Schmunk)
September 15, 2009, 11:33am
6
I would like to help here, or give at least some input.
Who is responsible for CSS and styles in the core team? I wanna contact him/her.