Announcement

Collapse
No announcement yet.

Forum List Container - Margins

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

  • Forum List Container - Margins

    Looking to remove some of the margins/padding in the photo posted. Been trying to create all kinds of CSS codes with margins but can't get it to work. I have been putting this after a bunch of codes
    Code:
    { margin-top: -40px; }
    . Changing the -40px to see if anything happens but nothing yet.

    This is the code that I see when I highlight the area with Inspect Element.
    Code:
    .forum-list-container .forum-item
    Trying to remove the space above the title and below the description.




  • #2
    There are actually several classes that effect that spacing. These will get you started on your code snowball.
    Code:
    td.cell-forum, .lastpost, topics-count, posts-count {
        padding-top: 6px!important;
        padding-bottom: 2px!important;
    }


    Comment


    • #3
      Originally posted by Replicant View Post
      There are actually several classes that effect that spacing. These will get you started on your code snowball.
      Code:
      td.cell-forum, .lastpost, topics-count, posts-count {
      padding-top: 6px!important;
      padding-bottom: 2px!important;
      }
      Typo. You missed the dot.
      Code:
      td.cell-forum, .lastpost, .topics-count, .posts-count {
          padding-top: 6px!important;
          padding-bottom: 2px!important;
      }
      Flash04jv the reason your code was not working because margins don't work on table rows (tr) and cells (td).

      GIPHY for vB5 AutoLinker Auto-Create Flag Report Topic Social Icons in Postbit Clear Cache Cron DragDrop Upload Topic AJAX AutoUpdate Custom Avatars Selector Stop Links in Posts...and more!

      Comment


      • Flash04jv
        Flash04jv commented
        Editing a comment
        Dang, I wondered if I needed padding and not margins. I was going off the code I used for my read unread logos and some old threads on here. I'll give it a shot.

      • Replicant
        Replicant commented
        Editing a comment
        Thanks for the catch Glenn. I copied and pasted it from the dev environment, don't know why the dots didn't carry over.

    • #4
      Thanks Guys! Exactly what I was wanting! I am currently using these, this made it look exactly like the screen shots I got off our old forum. For some reason the bottom padding on the cell-forum was messing up our Blog cell if I made it smaller than like 8px, so I just deleted it for now.

      Code:
      .cell-forum
      {padding-top: 5px!important;}
      
      .lastpost
      {padding-top: 7px!important;
      padding-bottom: 9px!important;}
      What did the 'td' in front of the codes do? I removed those and nothing happened so I left them off. Also curious what these do:
      Code:
      !important
      They are in lots of my codes.

      Comment


      • Replicant
        Replicant commented
        Editing a comment
        The td is in there because it's part of the CSS path. Sometimes it's necessary, like if the same class is used in a div or a tr, the code would only affect the td. The !important will force the overwrite of stubborn CSS or hard coded CSS and should be used sparingly and only when necessary. If your initial code doesn't work right away, try the !important.

      • Flash04jv
        Flash04jv commented
        Editing a comment
        Oh, ok. Thanks for the info!

    • #5
      Is it possible to do this on a specific forum? I found the Forum IDs, but can I insert them in the code somehow to only affect that specific Forum?

      Something similar to this maybe? This isn't doing anything for me

      Code:
      .cell-forum .id=forum57
      {padding-top: 50px!important;}

      Comment


      • #6
        You're close. Use the # sign for CSS id

        Code:
        #forum57 > td{
        padding-top: 50px!important;
        }
        Try it without !important first.


        Comment


        • Flash04jv
          Flash04jv commented
          Editing a comment
          Bingo! Works without the !important. So close, getting better at it I think.. Thanks!
      widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
      Working...
      X