Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Color box: Difference between revisions

Template page
m Add option to disable the default of the content of the box being in italics. Increase top/bottom margin to stop from being glued to other divs.
Change default background-color to transparent. Change default text color to inherit.
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="
<div style="
margin: 0.2em auto;  
margin: 0.2em auto;
border: 2px solid {{{border|#888888}}};  
border: 2px solid {{{border|#888888}}};
padding: 0.8em;  
padding: 0.8em;  
width: {{{width|auto}}};  
width: {{{width|auto}}};
background-color: {{{color|black}}};  
overflow: hidden; /* To stop the div from overlapping floating elements. */
text-align: {{{align|left}}};  
background-color: {{{color|transparent}}};
color: {{{text|white}}};  
text-align: {{{align|left}}};
color: {{{text|inherit}}};
{{#ifeq: {{{italics}}} | no
{{#ifeq: {{{italics}}} | no
  |
  | font-style: normal;
  | font-style: italic;
  | font-style: italic;
}}
}}