You can think of many ways to use lines into your website. However, one of the most common uses of it is to separate texts from each other. One example of such use is separating a headline from its body as shown below.
To add the Line element, simply search "line" and select Line.
When you inspect a Line element, you'll see the following settings: Direction, Base Font, Width & Max Width, Size and Color & Style.
Horizontal is the default value. If this is the selected option, the Line Element will be positioned, well, horizontally.
If you select Vertical, then the line will be standing up. It's seldom that you will be using Vertical in Cornerstone / Content Builder, though it's good to point out that this option is available to you. The usual and practical usage of the vertical option is in Pro's Header and Footer Builders.
Base Font Size
If you will be using the EM unit for the Size field, then the value you will be setting for the Base Font Size field will influence how the Size field will calculate the value. Let me explain with an example:
If you set the value of 2 EM for the Base Font Size and set Size to 2 EM also, that Line element will be thicker than if the value of the Base Font Size is just 1 EM. If the Base Font Size is 20 PX and the Size is 1 EM, that would be thicker than if the value of Base Font Size is just 10 PX.
If you use either PX or REM for the Size field, then the value you set for Base Font Size will be ignored.
Width & Max Width
Width is the actual width of the Line element. The width cannot go beyond the Max Width. Max Width is useful for handling responsiveness of an element.
This sets the thickness of the Line Element.
Color & Style
You can set the color of the Line and its style. Styles can be:
You can set the margin, border radius and box shadow of the Line element. Let's see how each setting relates to the Line element.
Use this option to set the margin of the line. You can change the settings for all the sides of the line or modify them individually.
Use this option to set a border radius for the line. You can set the curve on all sides or set them individually.
You can set a shadow over the linen using the box-shadow control group.
- X-Offset - Use this option to set the X offset of the shadow in the line.
- Y-Offset - Use this option to set the Y offset of the shadow in the line.
- Blur - Use this option to set the intensity of the blur effect in the line.
- Spread & Position - Use this option to set the spread amount of the items section shadow and decide if you want the shadow to sit inside or outside of the line.
- Color - Use this option to set the color of the line shadow.
- ID - Use this option to set an HTML ID for the element. The ID should be unique on the page.
- Class - Use this option to set an HTML Class for the element. You can use the class for your custom CSS code.
- Element CSS - Use this option to have better control over the element to access the inner tags of the element using
$elas the CSS selection. Click here for more detailed information.
- Hide During Breakpoint - Use this option to hide the element on different device sizes. Click here for more information.
- Custom Attributes - Use this option to add a custom attributes to the wrapper HTML tag of the element. Such as
data-info=123. You can use the option to inject custom information into the element to use on your customization code.
To see a live demo of the Line Element click here.
There you have it! Now you know how to add and design vertical and horizontal lines using Cornerstone / Pro Builders.
See something inaccurate? Let us know