HG Collins’ Handy Styling Guide: Difference between revisions
No edit summary |
|||
(20 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
.mw-headline { | .mw-headline { | ||
font-size:50px; | font-size:50px; | ||
font-weight: 700; | |||
font-family: times new roman; | |||
-webkit-text-stroke: 1px #000000; | |||
color: #f4bceb; | |||
} | |||
.so-fancy { | |||
font-size:45px; | |||
font-weight: 700; | font-weight: 700; | ||
font-family: times new roman; | font-family: times new roman; | ||
Line 16: | Line 23: | ||
} | } | ||
}} | }} | ||
'''This guide is for anyone wishing to add their own unique style to their stories. Don't know how to code? Style your stories without learning CSS with [[The Simple Universal Stylesheet]].''' | |||
This is a guide for anyone who isn't all that familiar with CSS, but would like to add some style elements to their stories. These are simple things you can copy and paste into your stylesheet or in between the CSS tags at the top of a story page. [https://stories.allthefallen.moe/index.php?title=Format_Rules/CSS Here is the link for setting up CSS on your stories]. It's pretty simple to use once you get the hang of it and if you're using a browser like Chrome, you can right click and inspect element to look at a page's code and test things out to see what they'll look like. Using the "Show preview" button will come in handy, too. If you're using a stylesheet instead of inline CSS, keep in mind your CSS changes might not appear right away if your browser has already cached them to save on load time. This is where using a private browser window comes in handy. | This is a guide for anyone who isn't all that familiar with CSS, but would like to add some style elements to their stories. These are simple things you can copy and paste into your stylesheet or in between the CSS tags at the top of a story page. [https://stories.allthefallen.moe/index.php?title=Format_Rules/CSS Here is the link for setting up CSS on your stories]. It's pretty simple to use once you get the hang of it and if you're using a browser like Chrome, you can right click and inspect element to look at a page's code and test things out to see what they'll look like. Using the "Show preview" button will come in handy, too. If you're using a stylesheet instead of inline CSS, keep in mind your CSS changes might not appear right away if your browser has already cached them to save on load time. This is where using a private browser window comes in handy. | ||
Line 21: | Line 31: | ||
''Most of the CSS code templates I include in this page will deal with ease of readability. I'm real big on making my stories as easy to read as possible.'' | ''Most of the CSS code templates I include in this page will deal with ease of readability. I'm real big on making my stories as easy to read as possible.'' | ||
I'll be adding to this periodically as I have time. | I'll be adding to this periodically as I have time. I occasionally just drop code in here so it's in one convenient place for me instead of having to dig through the site's code again to find what I want. | ||
Line 31: | Line 41: | ||
} | } | ||
</pre> | </pre> | ||
Changing the size of your paragraph font will also change the size of the font in the announcement bar at the top of the page. This can be annoying if you're increasing the font size, especially on mobile devices where it can take up the entire page. The following code takes care of that issue. | |||
Changing the size of your font will also change the size of the font in the announcement bar at the top of the page. This can be annoying if you're increasing the font size, especially on mobile devices where it can take up the entire page. The following code takes care of that issue. | |||
<pre> | <pre> | ||
#localNotice p { | #localNotice p { | ||
Line 45: | Line 53: | ||
font-size: 16pt; | font-size: 16pt; | ||
font-family: Georgia; | font-family: Georgia; | ||
color: Blue; | |||
} | } | ||
</pre> | </pre> | ||
==''' | =='''Text Style'''== | ||
Changing the font | Changing the font family is an easy way to make your text fancy. You can use a few standard fonts and ATF stories has a few in their code you can choose, too. I have included all of them below. | ||
<div style="padding-left:40px;"> | <div style="padding-left:40px;"> | ||
Line 95: | Line 104: | ||
<hr> | <hr> | ||
<p style="font-family:brush script mt; font-weight:bold; font-size: 25pt;">Brush Script MT</p> | <p style="font-family:brush script mt; font-weight:bold; font-size: 25pt;">Brush Script MT</p> | ||
<p style="font-family:brush script mt; font-size: | <p style="font-family:brush script mt; font-size: 25pt;">Well, aren't we getting fancy now? Some mobile browsers ignore this font, it seems.</p> | ||
<pre> | <pre> | ||
font-family: brush script mt; | font-family: brush script mt; | ||
Line 101: | Line 110: | ||
<hr> | <hr> | ||
<p style="font-family:Great Vibes; font-weight:bold; font-size: 25pt;">Great Vibes</p> | <p style="font-family:Great Vibes; font-weight:bold; font-size: 25pt;">Great Vibes</p> | ||
<p style="font-family:Great Vibes; font-size: | <p style="font-family:Great Vibes; font-size: 25pt;">I personally use this font for my chapter titles. It's another one that <span style="font-weight:bold">looks great bolded!</span></p> | ||
<pre> | <pre> | ||
font-family:Great Vibes; | font-family:Great Vibes; | ||
Line 107: | Line 116: | ||
<hr> | <hr> | ||
<p style="font-family: Dawning of a New Day; font-weight:bold; font-size: 25pt;">Dawning of a New Day</p> | <p style="font-family: Dawning of a New Day; font-weight:bold; font-size: 25pt;">Dawning of a New Day</p> | ||
<p style="font-family: Dawning of a New Day; font-size: | <p style="font-family: Dawning of a New Day; font-size: 25pt;">Sign your name on the dotted line...</span></p> | ||
<pre> | <pre> | ||
font-family: Dawning of a New Day; | font-family: Dawning of a New Day; | ||
</pre> | </pre> | ||
<hr> | |||
<p style="font-family: Cursive; font-weight:bold; font-size: 20pt;">Cursive</p> | |||
<p style="font-family: Cursive;">Just looks like Comic Sans to me, may show up differently on other browsers/devices.</span></p> | |||
<pre> | |||
font-family: Cursive; | |||
</pre> | |||
<hr> | |||
<p style="font-family: fantasy; font-weight:bold; font-size: 20pt;">Fantasy</p> | |||
<p style="font-family: fantasy;">Wow, it's like I woke up from a dream with elves and unicorns,</span></p> | |||
<pre> | |||
font-family: fantasy; | |||
</pre> | |||
</div> | |||
'''A few more things you can do with text''' | |||
<div style="padding-left:40px;"> | |||
<p style="font-weight:bold">This text is bold</p> | |||
<pre> | |||
font-weight: bold; | |||
</pre> | |||
<p style="text-decoration: underline;">This text is underlined</p> | |||
<pre> | |||
text-decoration: underline; | |||
</pre> | |||
<p style="font-style:italic">This text is italicized</p> | |||
<pre> | |||
font-style: italic; | |||
</pre> | |||
<p style="text-align:center">This text is centered</p> | |||
<pre> | |||
text-align: center; | |||
</pre> | |||
<p class="so-fancy">This is the fancy header text I've been using on this page</p> | |||
<pre> | |||
font-size:50px; | |||
font-weight: 700; | |||
font-family: times new roman; | |||
-webkit-text-stroke: 1px #000000; | |||
color: #f4bceb; | |||
</pre> | |||
Line 121: | Line 174: | ||
</pre> | </pre> | ||
[[category: | <div style="background:#F3D6FD; padding: 20px;"> | ||
This section has a colorful background | |||
<pre> | |||
<div style="background:#F4BCEB"> | |||
Your content goes here! | |||
</div> | |||
</pre> | |||
</div> | |||
'''Here's how you can color your text''' | |||
<div style="padding-left:40px;"> | |||
'''Adding Color to a paragraph''' | |||
<p style="color:#c912ab">Use this if you want an entire paragraph to be a different color.</p> | |||
<pre> | |||
style="color:#c912ab" | |||
</pre> | |||
<hr> | |||
'''Adding color to only select text''' | |||
<p>Use this if you only want to a <span style="color:#c912ab>small part of you text</span> to have color</p> | |||
<pre> | |||
<span style="color:#c912ab">Your Text Here</span> | |||
</pre> | |||
</div> | |||
'''How to add a background to an entire story''' | |||
simply include this code in your stylesheet or inline style and change the color to whatever you want. This will also add padding of 40px all around so your text doesn't run up against the side. | |||
<pre> | |||
.mw-parser-output { | |||
background: #F3D6FD; | |||
padding: 40px; | |||
} | |||
</pre> | |||
=='''Mobile Responsive Elements'''== | |||
ATF stories doesn't have a mobile site, so fonts can look really small on mobile devices. I don't like that, so I wrote this bit of code to tell phones to make my paragraphs larger. '''Always place this code last in your CSS. Otherwise other CSS will override it.''' | |||
<pre> | |||
@media screen and (max-width: 992px) { | |||
p{ | |||
font-size: 25pt; | |||
} | |||
} | |||
</pre> | |||
<p class="center">Learn More at [https://www.w3schools.com/ W3 Schools]</p> | |||
[[category:Styling Your Story - CSS Tips]] |
Latest revision as of 09:16, 17 January 2022
This guide is for anyone wishing to add their own unique style to their stories. Don't know how to code? Style your stories without learning CSS with The Simple Universal Stylesheet.
This is a guide for anyone who isn't all that familiar with CSS, but would like to add some style elements to their stories. These are simple things you can copy and paste into your stylesheet or in between the CSS tags at the top of a story page. Here is the link for setting up CSS on your stories. It's pretty simple to use once you get the hang of it and if you're using a browser like Chrome, you can right click and inspect element to look at a page's code and test things out to see what they'll look like. Using the "Show preview" button will come in handy, too. If you're using a stylesheet instead of inline CSS, keep in mind your CSS changes might not appear right away if your browser has already cached them to save on load time. This is where using a private browser window comes in handy.
Most of the CSS code templates I include in this page will deal with ease of readability. I'm real big on making my stories as easy to read as possible.
I'll be adding to this periodically as I have time. I occasionally just drop code in here so it's in one convenient place for me instead of having to dig through the site's code again to find what I want.
Paragraph Style
This code will make all of your paragraphs larger and make your stories easier to read. You can change the number to make it bigger or smaller. The “p” represents paragraphs, and you can add other lines of code in between the { } in order to add additional styling. Examples of things you can do are included in this page.
p { font-size: 16pt; }
Changing the size of your paragraph font will also change the size of the font in the announcement bar at the top of the page. This can be annoying if you're increasing the font size, especially on mobile devices where it can take up the entire page. The following code takes care of that issue.
#localNotice p { font-size: 11pt !important; }
You can add elements like colors and different fonts to your paragraphs. Here's an example of a paragraph with a custom font. Example:
p { font-size: 16pt; font-family: Georgia; color: Blue; }
Text Style
Changing the font family is an easy way to make your text fancy. You can use a few standard fonts and ATF stories has a few in their code you can choose, too. I have included all of them below.
Georgia
This font is Georgia. It's a great standard paragraph font to use because it's very easy to read and it's the paragraph font on this page!
font-family: georgia;
Arial
This is the most widely used font. You've probably seen it before...
font-family: arial;
Monospace
Simplicity at its most boring. Just my thoughts on the matter.
font-family: monospace;
Sans Serif
Simple yet respectable. Just the way you like it.
font-family: sans-serif;
Garamond
This font is another one that is nice and easy to read. I still like Georgia better.
font-family: garamond;
Trebuchet MS
This is a pretty nice looking font. I've always liked how this one looks bolded.
font-family: trebuchet MS;
Times New Roman
This font probably doesn't need an introduction.
font-family: times new roman;
Brush Script MT
Well, aren't we getting fancy now? Some mobile browsers ignore this font, it seems.
font-family: brush script mt;
Great Vibes
I personally use this font for my chapter titles. It's another one that looks great bolded!
font-family:Great Vibes;
Dawning of a New Day
Sign your name on the dotted line...
font-family: Dawning of a New Day;
Cursive
Just looks like Comic Sans to me, may show up differently on other browsers/devices.
font-family: Cursive;
Fantasy
Wow, it's like I woke up from a dream with elves and unicorns,
font-family: fantasy;
A few more things you can do with text
This text is bold
font-weight: bold;
This text is underlined
text-decoration: underline;
This text is italicized
font-style: italic;
This text is centered
text-align: center;
This is the fancy header text I've been using on this page
font-size:50px; font-weight: 700; font-family: times new roman; -webkit-text-stroke: 1px #000000; color: #f4bceb;
Color
This code can be added to a paragraph code to change the color of your font. Just use a color picker tool and copy the hex code. This example with make your text dark blue!
color: #260C83;
This section has a colorful background
<div style="background:#F4BCEB"> Your content goes here! </div>
Here's how you can color your text
Adding Color to a paragraph
Use this if you want an entire paragraph to be a different color.
style="color:#c912ab"
Adding color to only select text
Use this if you only want to a small part of you text to have color
<span style="color:#c912ab">Your Text Here</span>
How to add a background to an entire story simply include this code in your stylesheet or inline style and change the color to whatever you want. This will also add padding of 40px all around so your text doesn't run up against the side.
.mw-parser-output { background: #F3D6FD; padding: 40px; }
Mobile Responsive Elements
ATF stories doesn't have a mobile site, so fonts can look really small on mobile devices. I don't like that, so I wrote this bit of code to tell phones to make my paragraphs larger. Always place this code last in your CSS. Otherwise other CSS will override it.
@media screen and (max-width: 992px) { p{ font-size: 25pt; } }
Learn More at W3 Schools