Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo

Inline CSS added to SS generated Fieldsets and Tab Sets


Go to End


7 Posts   3670 Views

Avatar
CodeGuerrilla

Community Member, 105 Posts

18 November 2008 at 7:55pm

Edited: 05/12/2008 6:16pm

Hi,

Having major problems with SS forms in a CMS module I have created, there seems to be a lot of inline styles being added to various elements such as SS created FieldSets and even to elements in my template specifically stuff like:

<div style="overflow: hidden;">

And from a FieldSet defined in a SS Form

<fieldset style="overflow: hidden; height: 15px;">

As you can imagine this is causing problems as the field set is set to 15px and then the containing div is set to overflow hidden, where in the SilverStripe universe are these being set, I have looked at FieldSet api docs and doesn't seem to be any extra params for height or styles or anything.

The other problem is that the fieldset has set height and means that some of the elements in the form are cut off and no scrolling is allowed.

Any help appreciated.

Avatar
CodeGuerrilla

Community Member, 105 Posts

5 December 2008 at 6:19pm

Bump!

Anyone have any ideas? I have tried to override the inline styles using !important in the stylesheet but still not working really need to sort this out...

Avatar
CodeGuerrilla

Community Member, 105 Posts

10 December 2008 at 3:02pm

Okay it gets worse in IE6/7 the fieldset and my containing div both have a height of 0px so none of the tabs will display their form fields at all, have been searching through both the cms and sapphire code to try and find where these are being set I am guessing that these are being added to the elements at runtime via JavaScript is this correct?

Avatar
Nivanka

Community Member, 400 Posts

10 December 2008 at 3:10pm

try with using firebug, a plugin for the firefox.

with that you can find these stuff easily.

http://getfirebug.com/

Avatar
CodeGuerrilla

Community Member, 105 Posts

10 December 2008 at 3:16pm

Hi Nivanka, I am using FireBug and the IE Developer Toolbar this is why I can see the inline styles being set just can't seem to figure out where... SS incudes a lot of CSS and JS files to go through...

Avatar
Nivanka

Community Member, 400 Posts

10 December 2008 at 3:18pm

try to use 'important' in your css files, that will give the priority to the css file.

with that you will be able to do something

Avatar
CodeGuerrilla

Community Member, 105 Posts

10 December 2008 at 3:26pm

Edited: 10/12/2008 3:27pm

Yes tried that too, seems to work okay in IE6 and Firefox but IE7 won't play nice :(

This is also a bit hacky for my liking I would like to understand why these heights are being set on the TabSet/Fieldset and Form