Paragraph with a background and border.

Updated: 12/23/2015

There is now a Border Box element that can be found in the Weebly App Center. This makes the HTML instructions below outdated and no longer necessary but for the time those instructions will remain. 


​Border Box Element ($5.00)

Picture

 


Old HTML instructions:

I have saw multiple people asking if there it was a way to add text or a paragraph to their Weebly site that had a box around it, or a background color with a border. Even if you are not familiar with custom HTML and CSS, there are a tools to help.

Below you will find a short video to demonstrate this example, 
and to show you how to add it to your Weebly website. 

This is a bit of text, that you will add to your site to explain the content of the page or product.
You may want this area to stand out. This is roughly 95% of the width of the area it is in, and it uses the content area default font styling.
You can use a column elements to adjust it’s width and positioning.

To add a line break you simply add a ‘greater than sign’, the letter B the letter R than a ‘less than sign’ To learn more about CSS and HTML please visit Visit W3Schools! You can use the search feature in the top right corner to find what you’re looking for if you’re unfamiliar with the website. Don’t Miss the demonstration video below!


I will start with the basics.


The CSS:
.featurebox {
  width: 90% !important;
  background: #323232;
  border: 1px solid #F50;
  border-radius: 10px;
  -moz-border-radius: 15px;
  -webkit-border-radius: 15px;
  margin: 0 auto;
  padding: 15px 10px 15px 10px !important;
}



You may even want to add: 
textalign: left;   

if you ‘center’ the Custom HTML Element
using the elements’ toolbar,
it will center the text too


The HTML:

featurebox“>
This is a bit of text, that you will add to your site to explain the content of the page or product. You may want this area to stand out. This is roughly 95% of the width of the area it is in, and it uses the content area default font styling. You can use a column elements to I just it’s width and positioning.

To add a line break you simply add a ‘greater than sign’, the letter B the letter R than a ‘less than sign’ To learn more about CSS and HTML please visit Visit W3Schools! You can use the search feature in the top right corner to find what you’re looking for if you’re unfamiliar with the website. Don’t Miss the demonstration video below!



Here’s an example

Remember, the HTML div ‘class’ name was the only thing that changed, make sure to have the same title as the new css for this box. 

This is a bit of text, that you will add to your site to explain the content of the page or product.
You may want this area to stand out. This is roughly 95% of the width of the area it is in, and it uses the content area default font styling.
You can use a column elements to adjust it’s width and positioning.

To add a line break you simply add a ‘greater than sign’, the letter B the letter R than a ‘less than sign’ To learn more about CSS and HTML please visit Visit W3Schools! You can use the search feature in the top right corner to find what you’re looking for if you’re unfamiliar with the website. Don’t Miss the demonstration video below!


Need Help?
Weebly’s Theme/Design help section:  http://kb.weebly.com/html-css.html  
The Weebly custom HTML element:
http://kb.weebly.com/custom-html.html 
W3Schools CSS Tutorials:   http://www.w3schools.com/css/default.asp

Don’t forget to like and share!

5 Comments

Write a Reply or Comment

Your email address will not be published.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.