Text Boxes P1.

⎡Designs of a Muse⎦« Layout Tutorials »
 
 
 Text Boxes P1.
Let's start with the most basic code that will help you in all kinds of layouts. Whether you plan to create your own shop, or simply want your story to look pretty, you will need to know how to create text boxes.

So what are text boxes? 

As the name suggests, they are boxes that contain text. There are two ways to do this, but I will be showing you how to use the < div > < /div > tags today.

The most basic code looks like this:

< div style="background:#ffffff;border:2px solid #000000;" > Enter desired text. < /div >

To give you this:
 
Enter desired text.


You can change the border color, size (width) and style of the text box by changing the values attached to the "border" attribute. The number in front of "px" determines how wide the border will be. Most borders will be anywhere between 2-5px. Don't go any higher in value unless what you are creating is proportional to the box you are making. 

Changing "solid" to dashed, dotted or double will change the appearance of the border. You can see what these look like by scrolling the outer box of this tutorial to the right. 

The # value is the html color code for the border. Change the six digit code to whatever color value you like. You can also use rgb color codes in the form rgb(xxx,xxx,xxx) where the x are replaced by the corresponding color values.

You can change the background color of the text box by changing the 6 digit # code for "background".

If you want to ensure that you don't accidentally change the wrong attributes during editing, you can also split these values up into border-style / border-width and border-color.

< div style="background:#ffffff; border-style:double; border-width:2px; border-color:#000000;" > Enter desired text. < /div >
 

Enter desired text. 
   

 

Examples
< div style="background:#ffffff;border:2px solid #000000;" > Enter desired text. < /div >

 

 
< div style="background:#ffffff;border:2px dashed #000000;" > Enter desired text. < /div >

 

 
< div style="background:#ffffff;border:2px dotted #000000;" > Enter desired text. < /div >

 


For the following border style, you need to split up the border attributes into style, size and color:
< div style="background:#ffffff;border-style:double;border-width:2px ;border-color:#000000;" > Enter desired text. < /div >

 


To change the color:
< div style="background:#ffffff;border:2px solid #CC99FF;" > Enter desired text. < /div >

S
C
R
O
L
L
← SCROLL for Example →
Like this story? Give it an Upvote!
Thank you!

Comments

You must be logged in to comment
rolling-thunder #1
Chapter 8: Just a question before I try this out--
Does this work the same way for pictures?
Like if I was to make a horizontal scroll for pictures, would it work the same way as with boxes?
-xttran #2
Chapter 4: I'm still very confused on how to make a vertical scroll ;-; /sobs/
Rose_17 #3
Chapter 1: Hello !! May I ask? Because I've been trying to apply the borders but can't. Do I copy the code you provided to the source? or something else?
CaramelMilkTea98
#4
Chapter 6: Waiting for more tutorials authornim~ I've been wanting to try making a layout or something to make my story more interesting haha. Thank you so much for writing these^^