Welcome to the TWC Wiki! You are not logged in. Please log in to the Wiki to vote in polls, change skin preferences, or edit pages. See HERE for details of how to LOG IN.

Difference between revisions of "Help:CSS Classes"

From TWC Wiki
Jump to navigationJump to search
(Tables)
(Tables)
Line 142: Line 142:
 
|}
 
|}
  
   
+
<br>
 +
<br>
 +
<br>
 +
<br>
 +
----
 +
 
 +
 
 +
===class; wikitable===
 +
 
 +
  <code><nowiki>
 +
{| class="wikitable"
 +
|-
 +
! HEADING TEXT HERE !! HEADING TWO !! THREE
 +
|-
 +
|more text || some more text || another thing
 +
|-
 +
|Much more text for length here waffle waffle || Waffle waffle waffle waffle || Shut up now please!
 +
|}
 +
</nowiki></code>
 +
 
 +
{| class="wikitable"
 +
|-
 +
! HEADING TEXT HERE !! HEADING TWO !! THREE
 +
|-
 +
|more text || some more text || another thing
 +
|-
 +
|Much more text for length here waffle waffle || Waffle waffle waffle waffle || Shut up now please!
 +
|}
  
  
  
 
[[Category:Wiki Administration]]
 
[[Category:Wiki Administration]]

Revision as of 00:14, 18 April 2020

On this Wiki various 'classes' are set up in the CSS which allow standard types of coloured boxes etc to be created by calling the class instead of giving full information to make a table cell. The display effect and text required is shown below. Please note that these change according to which skin you are using. The default skin is TWC (default) which is a coloured version of monobook, Anisa currently uses beige/brown background colours to match the forum, DarkVector is 'dark', the other skins are mainly grey text on white background.

If you are designing anything complicated please check design in at least the TWC (default) skin, Anisa, DarkVector and one of the white/grey skins.

Classes for coloured backgrounds for portals etc

The appearance of classes with gradient backgrounds will vary slightly with the depth of the content, so are shown with a long paragraph in the example.

TWCportal_1

<div class="TWCportal_1">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
</div>

gives:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

TWCportal_2

Used as above gives:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

TWCportal_3

Used as above gives:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Classes for column spacing

Responsive column layout

A responsive column layout from http://www.responsivegridsystem.com/ is in use on the portal and main pages - the classes may also be used elsewhere to achieve a two or three column wide layout that stacks into a single column on small screens the code is as follows:


Two equal columns

<div class="TWCRsection TWCRgroup">
<div class="TWCRcol span_1_of_2">
Lorem ipsum etc.
</div>
<div class="TWCRcol span_1_of_2">
Lorem ipsum etc.
</div>

Gives:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.


Two columns split 40/60%

<div class="TWCRsection TWCRgroup">
<div class="TWCRcol span_40pct_of_2">
Lorem ipsum etc.
</div>
<div class="TWCRcol span_60pct_of_2">
Lorem ipsum etc.
</div>
</div>

Gives:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Reverse the order to have the larger column first.


Three columns

<div class="TWCRsection TWCRgroup">
<div class="TWCRcol span_1_of_3">
Lorem ipsum etc.
</div>
<div class="TWCRcol span_1_of_3">
Lorem ipsum etc.
</div>
<div class="TWCRcol span_1_of_3">
Lorem ipsum etc.
</div>
</div>

Gives:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

.span_2_of_3 is also available which spans the width of 2 out of 3 columns .span_full gives 100% width, but probably isn't necessary as that would be default behaviour without the class

If you want to try and invent anything for additional layouts it would need to be added to the Common.css to work for everyone viewing pages.


Tables

class; infobox


 {| class="infobox" 
 |-
 ! HEADING TEXT HERE !! HEADING TWO !! THREE
 |-
 |more text || some more text || another thing
 |-
 |Much more text for length here waffle waffle || Waffle waffle waffle waffle || Shut up now please!
 |}
 
HEADING TEXT HERE HEADING TWO THREE
more text some more text another thing
Much more text for length here waffle waffle Waffle waffle waffle waffle Shut up now please!

combined classes; infobox bordered


 {| class="infobox bordered" 
 |-
 ! HEADING TEXT HERE !! HEADING TWO !! THREE
 |-
 |more text || some more text || another thing
 |-
 |Much more text for length here waffle waffle || Waffle waffle waffle waffle || Shut up now please!
 |}
 
HEADING TEXT HERE HEADING TWO THREE
more text some more text another thing
Much more text for length here waffle waffle Waffle waffle waffle waffle Shut up now please!







class; wikitable


 {| class="wikitable" 
 |-
 ! HEADING TEXT HERE !! HEADING TWO !! THREE
 |-
 |more text || some more text || another thing
 |-
 |Much more text for length here waffle waffle || Waffle waffle waffle waffle || Shut up now please!
 |}
 
HEADING TEXT HERE HEADING TWO THREE
more text some more text another thing
Much more text for length here waffle waffle Waffle waffle waffle waffle Shut up now please!