Announcement

Collapse
No announcement yet.

Article Preview - Force font behaviour

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • [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".

  • #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 customization and demonstration site.
    vBulletin 5 Documentation - Updated every Friday. Report issues here.
    vBulletin 5 API - Full / Mobile
    I am not currently available for vB Messenger Chats.

    Comment


    • #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


      • #4
        So i guess nobody knows eh?..

        Comment


        • #5
          Originally posted by TopFloorDjs View Post
          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


          • #6
            Originally posted by TopFloorDjs View Post
            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 customization and demonstration site.
            vBulletin 5 Documentation - Updated every Friday. Report issues here.
            vBulletin 5 API - Full / Mobile
            I am not currently available for vB Messenger Chats.

            Comment

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