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.

Archive

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

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

Inline CSS added to SS generated Fieldsets and Tab Sets


Reply

7 Posts   2637 Views

Avatar
CodeGuerrilla

18 November 2008 at 7:55pm (Last edited: 5 December 2008 6:16pm), Community Member, 105 Posts

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

5 December 2008 at 6:19pm Community Member, 105 Posts

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

10 December 2008 at 3:02pm Community Member, 105 Posts

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

10 December 2008 at 3:10pm Community Member, 395 Posts

try with using firebug, a plugin for the firefox.

with that you can find these stuff easily.

[url]http://getfirebug.com/[/url]

Avatar
CodeGuerrilla

10 December 2008 at 3:16pm Community Member, 105 Posts

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

10 December 2008 at 3:18pm Community Member, 395 Posts

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

10 December 2008 at 3:26pm (Last edited: 10 December 2008 3:27pm), Community Member, 105 Posts

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