Article Preview - Force font behaviour

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • decafdev
    Member
    • Mar 2010
    • 46
    • 4.2.5

    [CMS] Article Preview - Force font behaviour

    Template: vbcms_content_article_preview
    I want the article preview NOT to adopt font behaviour from the article.

    !important tag does not work - example:
    <div style="text-align:left !important;">{vb:raw previewtext}</div>

    I've also unsuccessfully tried adding !important tag to div class="cms_article_txt_content postcontainer".
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 74078

    #2
    Inline CSS doesn't need !important. It already has the highest level of specificity in CSS. See https://developer.mozilla.org/en-US/...SS/Specificity.

    You cannot use !important in class declarations as in your second example. It has no meaning.

    Using "text-align: left" is also the default value for that attribute. It is as if you hadn't applied a style at all. This is also the property applied in the computed style in vBulletin's default styles. What exactly are you trying to achieve here?
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    • decafdev
      Member
      • Mar 2010
      • 46
      • 4.2.5

      #3
      The articles are using font and paragraph behaviour which in the CMS articles list also shows, i want it to ignore all behaviours and use a standard parent CSS even with the article preview.

      Comment

      • decafdev
        Member
        • Mar 2010
        • 46
        • 4.2.5

        #4
        So i guess nobody knows eh?..

        Comment

        • In Omnibus
          Senior Member
          • Apr 2010
          • 2310

          #5
          Originally posted by TopFloorDjs
          So i guess nobody knows eh?..
          You could try using a CSS reset for the only the specific class(es) or ID(s) that pertain to the article preview but that may require assigning unique classes or IDs.

          I'm not currently running an instance of vB4 where I can check the HTML structure.

          Comment

          • Wayne Luke
            vBulletin Technical Support Lead
            • Aug 2000
            • 74078

            #6
            Originally posted by TopFloorDjs
            So i guess nobody knows eh?..
            There is no way to strip BBCode from a preview. As said above, you can try running a "Reset" CSS on this block.
            Translations provided by Google.

            Wayne Luke
            The Rabid Badger - a vBulletin Cloud demonstration site.
            vBulletin 5 API

            Comment

            widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
            Working...