CSS declarations II

Derek Bridge

Department of Computer Science,
University College Cork

CSS declarations II

Aims:

Padding

Borders

Rounded corners on borders

Example 1
Depending on your browser, this box might have rounded corners

More on rounded corners in CSS3

Example 2
border-top-right-radius: 24px;
border-top-left-radius: 24px;
Example 3
border-top-right-radius: 50px 30px;
border-bottom-right-radius: 50px 30px;

Margin

Box shadows

Example
Depending on your browser, this box might have a shadow

Navigation menus

Navigation menus: row of horizontal 'buttons'

Navigation menus: row of horizontal 'buttons'

nav ul
{
    list-style: none;
    margin: 0;
    padding: 0;
}

nav li
{
    display: inline;
}

nav a
{
    padding: 0.5em 1em 0.5em 1em;
    border: 1px solid #711515;
    text-decoration: none;
    color: white;
    background-color: #B51032;
}

nav a:hover
{
    background-color: #711515;
}

nav a[href=""]
{
    color: black;
    background-color: white;
}

Navigation menus: vertical sidebar