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. |
#202
|
||||
|
||||
How is it that you want to change things in that image (I don't see anything wrong in it). And, can we get a link to the actual page so we can play around with it using firebug.
|
#203
|
|||
|
|||
As you can see the text overlaps slightly. If I'm honest it'll probably be easier just to shortern.
However, how can I get the last post by down the bottom. |
#204
|
||||
|
||||
The site is very slow and I can't really play with it using firebug. But, if you want to move it down, add a margin-top to the CSS. If you want it moved down, then put it in it's own div and clear:both and it should move down.
|
#205
|
|||
|
|||
Im surprised by it being slow, perhaps just a busy time.
I've removed #cat51 .forumlastpost {display: none;} from the CSS to display the last post, but it's shifted the left cell down. Why is that? What code needs to be rectified? Thanks in advance. |
#206
|
||||
|
||||
It would help to have an image of what you want it to look like.
The cell was shifted down because of the height. You may want to set the height to 150px or so and set a background-color and bottom border for "#cat51 .childforum li.forumbit_post" |
#207
|
|||
|
|||
Im after how it currently looks on the main site.
|
#208
|
|||
|
|||
Any idea how to fix this problem?
Quote:
|
#210
|
|||
|
|||
@Lynne is absolutely right, your questions exceeds the How_to Article and is very confusing being part of this thread. As a moderator she needed to point this out -- not that you were arguing the point.
People spend too much time worrying about exact validation. I could spend half a day lecturing about it. It is only a another tool for developers. Depending on the browser and how they implement the doc type you will find that missing an end tag might have no affect to that browser even though "XHTML 1.0 Transitional" is considered an application of "XML" which is more strict on the way end tags are done. Load your HTML in a good IDE or Notepad++, spend a little time, you can find the missing tag -- "Warning", if it is not dynamically added. Depending on how you use the validator, it will not always report the correct answer. If no one is complaining... move on, life is too short. Hope this helps. |
#211
|
|||
|
|||
Quote:
No biggie. Have a wonderful day! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|