Styling Module Widgets Titles in the sidebar

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • webcms
    Senior Member
    • Jan 2014
    • 172
    • 5.0.X

    Styling Module Widgets Titles in the sidebar

    Article, Blog titles use H1 which is OK. However, the module widgets in the sidebar (Categories, Latest Topics, Tag Cloud, etc) also use <H1> for their titles. How can I change these widget titles to use H2 or H3 instead? I want H1 applied only to the article title, blog title, etc. My intention is to apply different fonts/sizes to article/blog title and widget titles in the sidebar but currently they both seem to use H1 tag.

    Please help...

    TIA
  • glennrocksvb
    Former vBulletin Developer
    • Mar 2011
    • 4021
    • 5.7.X

    #2
    By default, all module title has a font-size of 16px. If you want to keep that except for the page titles (this includes Blog article titles), you can add this in css_additional.css template:

    Code:
    .page-title-widget .module-title h1 { font-size: 20px; }
    That will affect all page titles. Change 20px to the desired font-size.

    Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

    Comment

    • webcms
      Senior Member
      • Jan 2014
      • 172
      • 5.0.X

      #3
      Thank you so much! You've made my day! vB gives us a great deal of control on styling.

      Comment

      • webcms
        Senior Member
        • Jan 2014
        • 172
        • 5.0.X

        #4
        One more question:

        How do I set font-face, line-spacing, etc for CK Editor in EDIT mode? I created and placed a javascript file on a subdomain and added it to the end of ckeditor_javascript template with its full path but it didn't work:

        {vb:js http://subdomain.domain.com/ckeditor.js}

        Does the JS file need to reside on the same domain for security reasons? Or do I need to use a different name for the file (I don't think name should matter).

        ​Please advise on usage of ckeditor_javascript template as it is not documented anywhere.

        Comment

        • Graham Walters
          Senior Member
          • Feb 2013
          • 143
          • 5.1.x

          #5
          I have a similar problem, an SEO analyzer I am using tells me that the Static HTML module uses the <h1> tag for the title, this means that every module on a page has a <h1> title which is not good for SEO, is there any way I can alter the tag for the Static HTML module ?

          Comment

          • glennrocksvb
            Former vBulletin Developer
            • Mar 2011
            • 4021
            • 5.7.X

            #6
            Originally posted by webcms
            One more question:

            How do I set font-face, line-spacing, etc for CK Editor in EDIT mode? I created and placed a javascript file on a subdomain and added it to the end of ckeditor_javascript template with its full path but it didn't work:

            {vb:js http://subdomain.domain.com/ckeditor.js}

            Does the JS file need to reside on the same domain for security reasons? Or do I need to use a different name for the file (I don't think name should matter).

            ​Please advise on usage of ckeditor_javascript template as it is not documented anywhere.
            The path needs to be relative to the base url. If you take a look at the view-source of the page, you would see the included js as:

            Code:
            <script type="text/javascript" src="http://www.domain.com/http://subdomain.domain.com/ckeditor.js?v=510"></script>
            If you want to change the style, do you really need js to do it? Ckeditor uses the css_editor.css template.

            Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

            Comment

            • webcms
              Senior Member
              • Jan 2014
              • 172
              • 5.0.X

              #7
              You're right - I chose a wrong template. I made changes to css_editor.css and they work now.

              However, I've just noticed that the Article editor grows in height beyond the boundaries of the screen based on the amount of content - needing to scroll the page up/down to scroll to the editor's boundaries. It is not consistent as it stops growing after a certain height and still needs scrolling within the editor too in addition to scrolling the page. Instead the editor should be sized no taller than the screen/window height as a standard behavior. This is an existing glitch I've verified by removing my changes and still seen the same behavior.
              Last edited by webcms; Tue 27 May '14, 10:41pm.

              Comment

              • glennrocksvb
                Former vBulletin Developer
                • Mar 2011
                • 4021
                • 5.7.X

                #8
                The ckeditor has "auto-grow" functionality with a maximum height set. You can see this feature at this ckeditor demo: http://ckeditor.com/demo#auto-grow

                Flag Icon Postbit Insert GIPHY Impersonate User BETTER INITIALS AVATAR Better Name Card Quote Selected Text Bookmark Posts Post Footer Translate Stop Links in Posts +MORE!

                Comment

                • webcms
                  Senior Member
                  • Jan 2014
                  • 172
                  • 5.0.X

                  #9
                  I understand auto-grow. What I was referring to is in vB, the initial height of the editor looks like it is a single-line edit. On the page you referred, they display a taller box that looks like a multi-line edit. TextArea/Editor elements should look like multi-line controls by rendering them a bit taller to make them look like they are at least 3-5 lines tall and indicate that they accept multi-line input.

                  Another point I mentioned is when the content is large, the editor grows beyond the boundaries of the screen (but NOT FULLY to accommodate the full content without having to scroll) - requiring us to scroll both the page as well as the editor. Many users are not savvy to do so.


                  On another note, I just noticed The editor seems to be screwed in some ways now - Type something, move the cursor back and type in between the previous text - it types at the end of the text!! The only way to type inside the previous text seems to be to delete all the way to that point and start re-typing (or cut/paste). Also backspace key deletes text at the wrong position. This is manifest in newly typed text and especially on the last line/paragraph.
                  Last edited by webcms; Mon 9 Jun '14, 1:37pm.

                  Comment

                  Related Topics

                  Collapse

                  Working...