Editing
Positioning Elements
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==== Border Property Shorthand ==== p105 CSS supports shorthand for borders. Declaration order is always top, right, bottom, left. You can remember this as TRouBLe (Top, Right, Bottom, & Left). If you leave out a side CSS interprets the last side equal to the opposite side. Example syntax without shorthand for borders: <pre>{margin-top:3px; margin-right:3px; margin-bottom:3px; margin-left:3px;}</pre> Example syntax with four sides: <pre>{margin: npx npx npx npx} where n = number</pre> Example syntax with three sides: <pre>{margin: npx Npx npx} means top, right, bottom and make left equal to right (N)</pre> Example syntax with two sides: <pre>{margin: npx Npx} means top, right and make bottom equal to top (n)and left equal to right (N)</pre> Example syntax with one side: <pre>{margin: npx} means make all four sides equal to n.</pre> If you want a side to be zero you can write it without using px. Example: <pre>{border: 1px 0 2px 0}</pre>
Summary:
Please note that all contributions to GotOpinion may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
GotOpinion:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
Edit source
View history
More
Search
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information