answersLogoWhite

0

In CSS syntax, you can control the display of a border through many different properties depending on your needs. Properties that control the border include: border, border-top, border-right, border-bottom, border-left, border-style, border-color, border-width, border-top-color, border-top-style, border-top-width, border-right-color, border-right-style, border-right-width, border-bottom-color, border-bottom-style, border-bottom-width, border-left-color, border-left-style, and border-left-width. With these numerous properties you can control each side of the border differently. The properties of border, border-width, border-style, border-color, border-top, border-right, border-bottom, and border-left are all shorthand properties in that you can specify multiple declarations in one property as opposed to setting each individual property separately.

Let's say you were wanting to put a 1 pixel, blue topaz, dashed border around all paragraphs. In your style sheet you would do:

p { border: 1px dashed #0198E1; }

That's the shorthand way to do it, which is the more common way. The following would result in the same thing but takes up more space then the above single declaration.

p {

border-top-color: #0198E1;

border-top-width: 1px;

border-top-style: dashed;

border-right-color: #0198E1;

border-right-width: 1px;

border-right-style: dashed;

border-bottom-color: #0198E1;

border-bottom-width: 1px;

border-bottom-style: dashed;

border-left-color: #0198E1;

border-left-width: 1px;

border-left-style: dashed;

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

Is the colon a valid example of CSS syntax?

No, a single colon in itself is not a valid example of CSS syntax.


A font-size 12px padding 2px margin 5px border 1px dotted yellow display block What does the 'a' in CSS mean?

"a" defines the html anchor tag (<a>), it is used to create links. "a" is used in css to style the link.


How can one amend border properties in CSS?

It is possible to amend border properties in CSS by understanding the border-syle value codes, border width codes, shorthand codes and border color codes.


How do you display a border like this in css The top border equals 10 pixels The bottom border equals 5 pixels The left border equals 20 pixels The right border equals 1pixel?

div.bordered { border-top:10px solid black; border-bottom:5px solid black; border-left:20px solid black; border-right:1px solid black; }


What does it mean to incorrectly render CSS?

When CSS is not compliant with set standards that are applicable, different browsers applying styles to a document with that CSS can display totally different styles, or display styles that are unnexpected or far-fetched -- this is also called "Incorrect Rendering."


Why does a css class not work in fire fox?

CSS classes do work in FireFox. What is the main problem? (specifically)Have you checked that the syntax is correct?There is a lot to learn about things with CSS and browsers, you may need a hack or fix, if all else fails.


What is the first thing to do in order to add a border to a paragraph?

The first thing to do in order to add a border to a paragraph is to use CSS to target the paragraph element and apply a border property with the desired styling, such as border width, color, and style. You can do this by specifying the paragraph element in CSS and using the border property to create the border effect.


How do you make border line in html?

You can't make border lines with HTML - you use CSS. <div id="mydiv">Content</div> <style type="text/css"> #mydiv {border: solid black 1px;} #mydiv {border: dashed red 1%;} #mydiv {border: none;} </style>


What is the syntax of the command to display a user's path of execution?

echo $PATH


How do you add a border to a div in XHTML strict?

You use CSS.If you have this document:---...---and add this CSS rule (in a ... tag or a separate file):---.test { border: 1px solid black; }---you will get a 1 pixel black border around the div.Check out CSS for other options.


Which websites allow you access to free menu templates?

Daily syntax is a website where free menu templates can be found in CSS. Also this can be found on CSS menu market and in tutorials how to run a cafe/restaurant.


Syntax when using image tag to an HTML document?

The basic syntax is:Additional optional attributes include height, width, and border.