The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
[HOW TO - vB4] Two column forum/sub-forum setup via CSS only
This is just a quick writeup of the very basics to achieve a two column setup for your forums through only the use of CSS - no template modifications or plugins required. (Original thread requesting this infomation is here.) I am NOT going to be teaching CSS is this article! You WILL need to have some basic understanding of what Cascading Style Sheets are all about in order to further change this since this is only the basics to put stuff in position with no padding or margins or any other styling applied - that is up to you to do. This was written during the beta3/beta4 testing and may need to be modified for use with other versions since classes may be changed as the style has not been finalized yet. This was written to work with the default style and default stylevars (default at this time, that is). If you have customized your style in any way, you may have to change this a bit to work with your style. These classes also only apply to the forum home page but can easily be modified (by you!) to work on the forumdisplay pages and to work only for certain categories. Making the browser width small may change things, or if you have long descriptions or sub-forums listed or moderators listed, you may have to change the CSS to accommodate that. As I said, this in ONLY AN OUTLINE of what you need to do. You will have to add styling information yourself. This is basically what you will end up with: The very basics of what to do Add this to the additional.css template - it must be added *after* any other definitions regarding these sub-forums have been declared - if you don't understand why that is, then please read up on exactly what Cascading Style Sheets are all about): Code:
.forumhead + .childforum .L2:first-child .forumrow, .forumhead + .L2 .forumrow { border-top: 0; } .forumrow .table { height: 100px; } ol.childforum { float: left; width: 100%; margin: 0; padding: 0; } .childforum li.forumbit_post { float: left; width: 50%; margin: 0; padding: 0; clear:none; } #forums .L1 .L2 { clear:none; } .forumbit_post .forumrow .forumlastpost { clear:both; width:95%; } .forumbit_post .forumlastpost .lastpostby { display: block; float: left; } .forumbit_post .forumlastpost .lastpostdate { display: block; float: right; } .forumbit_post .forumlastpost .lastposttitle { display: block; float: left; } .forumbit_post .foruminfo { clear:right; float:left; min-width:50%; width:70%; } .forumbit_post .forumstats, .forumbit_post .forumstats_2 { width:20%; } Code:
.subforums ol.subforumlist { float: left; width: 100%; margin: 0; padding: 0; } .subforumlist li.subforum { float: left; width: 50%; margin: 0; padding: 0; clear:none; } /* to remove the commas */ .commalist li.subforum:after { content:""; } Again, this article is NOT about teaching you CSS. You will have to style this yourself and also make any other changes necessarily because of customized styles or changes after beta 4. |
#122
|
|||
|
|||
Darlin' you rock! I found that code on another forum of dubious content. Now I know where they got it.
Is it possible to make the thread list in to 2 columns? |
#123
|
||||
|
||||
Sure, you could apply the same technique to the thread list on the forumdisplay pages.
|
#124
|
|||
|
|||
Is this known to be working still in 4.1.5? I applied the sub forum listing to the default template and saw no change. I added this to the additional.css file and the forumbits.css file...
Thanks! |
#125
|
||||
|
||||
I just added the subforum css to the additional.css template in one of my 4.1.5 default styles and it worked just fine.
|
#126
|
|||
|
|||
Doesn't seem to work for me either on my 4.1.5 test site....
|
#127
|
|||
|
|||
Edit: Still works as intended on 4.1.5, I just didn't with the way my forums and sections were configured.
|
#128
|
|||
|
|||
Using this CSS, can I replicate my existing look?
|
#129
|
||||
|
||||
Using just CSS? No. You will need to do template edits also.
|
#130
|
|||
|
|||
Hello Lynne, I'm still new to CSS and have read through this entire thread and tried messing with the codes but cannot achieve the end result I am looking for.
This is how my forum looks now (default 4.1.5 and there are child forums within here): This is how I want it to look (your second image in original post): And this is what I get when I post the code in my additional css. window: Could you please help me identify what I am doing wrong?? Thanks in advance, I really appreciate your time and help ok so I read the original thread that this one derives from and got this code from Charlie's post: .subforums ol.subforumlist { float: left; width: 100%; margin: 0; padding: 0; } .subforumlist li.subforum { float: left; width: 50%; margin: 0; padding: 0; clear:none; } /* to remove the commas */ .commalist li.subforum:after { content:""; }" I punched it into my forumbit.css and got a result similar to what I want: But I would very much rather have two columns instead of one, hopefully this is an easier question to answer?? Side note, I have the Forum Listing Display Options > Depth of Sub-Forums set to "1" so that they will appear, it defaults to 0 so nothing will show unless I change it to 1... |
#131
|
||||
|
||||
You would need to post a link to your forum/style so we can see what is going on.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|