Welcome to Dream.In.Code
Getting Help is Easy!

Join 86,375 Programmers. There are 1,437 online right now! Ask your question and get quick answers from Dream.In.Code experts. Join the #1 programming help community on the internet! Registration is fast and FREE... Join Now!

Chat LIVE With a Expert
Powered by LivePerson.com

Register to Make This Box Go Away!

css/DIV/Style & Borders

 
Reply to this topicStart new topic

> css/DIV/Style & Borders

no2pencil
Group Icon



post 22 Apr, 2008 - 10:39 PM
Post #1


css/DIV/Style & Borders:

Using standard HTML, your choice for border is limited, & can be pretty boring! You can change the color, the thickness, & that is about it.
However, with the use of stylesheets, you have much more of a variety of borders to implement onto your webpage.

There are three css settings you can change on your borders:

border-width
border-color
border-style

Most of the time you will only affect these attributes with 1 simple reference to the border attribute, however it is worth noting you can set these attributes individually.
As well, you will override anything that you have previously defined in a stylesheet since there is no order rule for these attributes.

Here's an example:

CODE

<div style="border: 3px coral solid;">text</div>


To affect specific sides, use the following attributes:

CODE

border-top
border-left
border-bottom
border-right


Using these you can force individual borders to display differently, or not at all.

CODE

<div style="border: red 4px dashed; border-bottom: blue 4px solid; border-top-style: ridge;">text</div>


border-width
This value can be assigned in pixels or you can use one of the three standard values thin, medium and thick.

CODE

border-width: thin;

border-width: medium;

border-width: thick;


border-style
This value allows you to adjust how your borders are presented. There are a total of eight possible styles you can choose from:

CODE

border-style: solid;

border-style: dashed;

border-style: dotted;

border-style: double;

border-style: groove;

border-style: ridge;

border-style: inset;

border-style: outset;


Lastly, one that should be familiar to you...

border-color
You can color your borders using either HEX codes or named colors.

CODE

border-color: black;

border-color: 000000;


Register to Make This Ad Go Away!


Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 5/17/08 02:54AM

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

Bye Bye Ads

Free DIC T-Shirt

T-Shirt Example

Related Sites

Monthly Drawing

Thumb Drive

Partners

Top Contributors

Top 10 Kudos This Month