The border-left shorthand CSS property sets all the properties of an element's left border. As with all shorthand properties, border-left always sets the values of all of the properties that it can set, even if they are not specified. It sets those that are not specified to their default values. Consider the following code: border-left-style: dotted;
border-left: thick green;
It is actually the same as this one: border-left-style: dotted;
border-left: none thick green;
The value of
border-left-style given before border-left is ignored. Since the default value of border-left-style is none, not specifying the border-style part results in no border. This property is a shorthand for the following CSS properties:Try it
Constituent properties
- border-left-color
- border-left-style
- border-left-width
Syntax
border-left: 1px; border-left: 2px dotted; border-left: medium dashed blue; /* Global values */ border-left: inherit; border-left: initial; border-left: revert; border-left: revert-layer; border-left: unset;
The three values of the shorthand property can be specified in any order, and one or two of them may be omitted.
Values
Formal definition
as each of the properties of the shorthand:
|
all elements. It also applies to ::first-letter. |
no |
as each of the properties of the shorthand:
|
as each of the properties of the shorthand:
|
Formal syntax
border-left =
<line-width> ||
<line-style> ||
<color>
<line-width> =
<length [0,∞]> |
thin |
medium |
thick
<line-style> =
none |
hidden |
dotted |
dashed |
solid |
double |
groove |
ridge |
inset |
outset
Examples
Applying a left border
HTML
<div>This box has a border on the left side.</div>
CSS
div { border-left: 4px dashed blue; background-color: gold; height: 100px; width: 100px; font-weight: bold; text-align: center; }
Results
Specifications
CSS Backgrounds and Borders Module Level 3 # border-shorthands |
Browser compatibility
BCD tables only load in the browser
See also
Required Headers
- Headers for all required pages must be consistently formatted; they should be the same size, font, and style, and located in the same position on each page. They must start at the very top of the page, on the first line below the 1-inch margin.
Chapter Headers
- Chapter headers are the only headers that can start lower on the page and be stylized in any manner, as long as they are consistent on each chapter title page.
Section Headers
- It is common for a chapter to have multiple levels of section headers. These can be formatted differently than required or chapter headers, as long as there is a consistent style from chapter to chapter.
Running Headers
- Your document should not have a running header that appears at the top of each page.
Page Margins
Page margins should be consistent throughout the text.
Required Margins:
- The top, bottom, and right margins are required to be 1 inch, but the left margin can either be 1 inch or 1.25 inches.
- All body text, tables, figures, appendices content, and any copies of published chapters must fit within the required 1-inch margins on all sides. Tables or images may have to be re-sized to fit within the margin. See the Tables and Figures page for more info.
Throughout your ETD, all text must start at the very top of the page. It is common for students to have trouble maintaining this consistency — often thanks to difficulty with Microsoft Word. The below instructions should help to specify the relevant settings in Microsoft Word and offer some helpful tips to maintaining consistency throughout your document.
- Check that your top margin is set to 1 inch.
- Check the page margin layout settings. On the “Layout” tab, in the “Margins” menu (found on the far left of the navigation bar), click “Custom Margins.” A “Page Setup” menu will appear. Under the “Layout” tab of this pop-up menu, make sure “Vertical alignment” is set to “Top.”
- Make sure you don’t have extra space in the header. Double-click on the header and hit the down arrow. If there are extra lines in the header, below the page number, delete them.
- Make sure there isn’t extra space between your text and the top of the page. All text must start on the first line at the very top of the page, just after the 1 inch margin line.
To more easily identify spacing inconsistencies as you scan your document, enable the “Gridlines” view:
If you are having trouble moving your text to the top of the page, check the “Header from Top” and “Footer from Bottom” settings.
- Double-click within the header or footer to edit them.
- Click the “Design” tab.
- See the below screenshot:
Spacing
Spacing must be consistent throughout the document. This includes:
- The amount of space between headers and body text.
- Line spacing of your body text (starting on your abstract page).
- Regardless of your text spacing, you should at least have a space between each entry on your table of contents, list of tables, list of figures, list of abbreviations, and reference pages.
- There should be a minimum amount of space separating body text from tables and figures.