coding help

About

Create up to 9 divs in a column layout to display how different CSS styles look. Here's an example:

Teal
background-color: teal;
Pink
background-color: pink;
Tan
background-color: tan;


Warning: Fragile code
Don't edit this intermediate-level template code unless you are familiar with complex code.
If not, don't let this stop you from learning! Visit your sandbox (User:<insert name here>/Sandbox), copy-paste the code, and tinker as much as you'd like.

Parameters

There are some general parameters (which apply in general) and some parameters for each CSS box (which apply to boxes individually).

General:

For individual boxes:

Example

Let's revisit our earlier example:

Teal
background-color: teal;
Pink
background-color: pink;
Tan
background-color: tan;

The code looks like this:

{{CSS demo divs
|heading1=Teal
|style1=background-color: teal;
|content1=STYLE
|extra1=color: white;
|heading2=Pink
|style2=background-color: pink;
|content2=STYLE
|extra2=color: black;
|heading3=Tan
|style3=background-color: tan;
|content3=STYLE
|extra3=color: black;
}}

As you can see:

Feel free to play around with this in your sandbox!

More info

Base code by MissLunaRose.

Columns of divs for code demos

Template parameters[Edit template data]

ParameterDescriptionTypeStatus
Width of all divswidth

How wide each div should be (default: 255px)

Example
200px
Unknownsuggested
Default div styledefaultStyle

Set a default style, e.g. font color. We've already got default padding.

Example
color: black;
Unknownsuggested
Container stylecontainerStyle

Tweak the style of the outer container (rarely needed)

Example
grid-gap: 5px;
Unknownoptional
Div 1 heading (optional)heading1

Optional heading to label Div 1

Example
Teal BG
Unknownsuggested
Div 1 stylestyle1

CSS styles for Div 1. End with a semicolon

Example
background-color: teal;
Unknownsuggested
Div 1 contentcontent1

Type some words or just write "STYLE" to make it display the CSS

Example
Teal background, STYLE
Unknownsuggested
extra1extra1

Extra "secret" styles that get applied to Div 1 but won't be shown

Example
color: white;
Unknownoptional
Div 2 heading (optional)heading2

no description

Example
Pink BG
Unknownsuggested
Div 2 stylestyle2

CSS styles for Div 2. End with a semicolon

Example
background-color: pink;
Unknownsuggested
Div 2 contentcontent2

Type some words or just write "STYLE" to make it display the CSS

Unknownsuggested
extra2extra2

no description

Unknownoptional
Div 3 heading (optional)heading3

no description

Example
Lavender BG
Unknownsuggested
Div 3 stylestyle3

CSS styles for Div 3. End with a semicolon

Example
background-color: lavender;
Unknownsuggested
Div 3 contentcontent3

Type some words or just write "STYLE" to make it display the CSS

Unknownsuggested
extra3extra3

no description

Unknownoptional
Div 4 heading (optional)heading4

no description

Example
Thistle BG
Unknownsuggested
Div 4 stylestyle4

CSS styles for Div 4. End with a semicolon

Example
background-color: thistle;
Unknownsuggested
Div 4 contentcontent4

Type some words or just write "STYLE" to make it display the CSS

Unknownsuggested
extra4extra4

no description

Unknownoptional
Div 5 heading (optional)heading5

no description

Example
LightCyan BG
Unknownsuggested
Div 5 stylestyle5

CSS styles for Div 5. End with a semicolon

Example
background-color: LightCyan;
Unknownsuggested
Div 5 contentcontent5

Type some words or just write "STYLE" to make it display the CSS

Unknownsuggested
extra5extra5

no description

Unknownoptional
Div 6 heading (optional)heading6

no description

Example
LightSkyBlue BG
Unknownsuggested
Div 6 stylestyle6

CSS styles for Div 6. End with a semicolon

Example
background-color: LightSkyBlue;
Unknownsuggested
Div 6 contentcontent6

Type some words or just write "STYLE" to make it display the CSS

Unknownsuggested
extra6extra6

no description

Unknownoptional
Div 7 heading (optional)heading7

no description

Example
CornSilk BG
Unknownsuggested
Div 7 stylestyle7

CSS styles for Div 7. End with a semicolon

Example
background-color: CornSilk;
Unknownsuggested
Div 7 contentcontent7

Type some words or just write "STYLE" to make it display the CSS

Unknownsuggested
extra7extra7

no description

Unknownoptional
Div 8 heading (optional)heading8

no description

Example
HoneyDew BG
Unknownsuggested
Div 8 stylestyle8

CSS styles for Div 8. End with a semicolon

Example
background-color: HoneyDew;
Unknownsuggested
Div 8 contentcontent8

Type some words or just write "STYLE" to make it display the CSS

Unknownsuggested
extra8extra8

no description

Unknownsuggested
Div 6 heading (optional)heading9

no description

Example
MistyRose BG
Unknownsuggested
Div 9 stylestyle9

CSS styles for Div 9. End with a semicolon

Example
background-color: MistyRose;
Unknownsuggested
Div 9 contentcontent9

Type some words or just write "STYLE" to make it display the CSS

Unknownsuggested
extra9extra9

no description

Unknownoptional
Container CSS classesclass

Add special classes to the container (e.g. for link control)

Suggested values
dark-links light-links
Example
dark-links
Unknownoptional