Please don't hard-code CSS in 'style' tags; use stylesheet instead
Last Post 10-26-2010 02:12 PM by Chad Nash. 3 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
Larry DanieleUser is Offline
going with the flow
going with the flow
Posts:57
Avatar

--

The only way to override this is by using the "!important" modifier in your stylesheet (e.g. "white-space: normal !important;") - something most people don't even know about and not a desirable thing in this case.

Why not just add "white-space:nowrap;" to your own CSS style definition? That would make it more obvious and allow easier overriding.

This principal should be true for all HTML tags you generate, not just this particular one. Since tags can have multiple classes, there is rarely a need to hard-code CSS in a tag. This would help to make your module more web-designer friendly.

Thanks!
10-16-2010 07:10 AM
    I'm using Dynamic Forms 3.4 and I find it frustrating when I can't easily control the style of an object on the page via a CSS stylesheet because there is hard-coded CSS in a 'style' attribute of an HTML tag.

    For example, I couldn't understand why, no matter how hard I tried to change the width of a DynamicForms_GridHeaderColumn class object, it wouldn't change. Then I looked at the generated source and see:

    style="white-space:nowrap;">Heading:
    Ryan BakerinkUser is Offline
    river guide
    river guide
    Posts:1900
    Avatar

    --
    10-26-2010 10:19 AM
    Hello Larry,

    I'm not quite sure if i see a question in this forum thread, it seems to be more of an informative type message to help others.

    If I missed the question in this post please let me know the concept of this thread.

    Thanks,

    Ryan
    Larry DanieleUser is Offline
    going with the flow
    going with the flow
    Posts:57
    Avatar

    --
    10-26-2010 10:31 AM
    This was a "gentle" request to the Dynamic Forms team to not include hard-coded "style=..." statements into the automatically generated HTML code since it is difficult and confusing to deal with. If you (the developers) feel compelled to put a style=... statement in the HTML, add a CSS class instead and define the style in the stylesheet.

    This will make it easier for all to customize forms to match a site.

    Thanks!

    Larry
    Chad NashUser is Offline
    Posts:5260
    Avatar

    --
    10-26-2010 02:12 PM
    Larry - Thank you for your feedback and comments I have added your notes for our review of the 3.5 release and will implement some of the changes you suggested pending review. I have also made note of your forum thread link once 3.5 is in development.

    Thanks,


    -Chad


    ---
  • film izle
  • 720 izle
  • film
  • sinema izle
  • film makinesi
  • T�rk�e dublaj film
  • film izle
  • film izle
  • baglan film izle
  • sinema izle
  • 1080 film izle
  • film mercegi