Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-settings.php on line 468 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-settings.php on line 483 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-settings.php on line 490 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-settings.php on line 526 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-includes/cache.php on line 103 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-includes/query.php on line 21 Deprecated: Assigning the return value of new by reference is deprecated in /home/bahus/data/www/fixblog.ru/css/wp-includes/theme.php on line 618 Fix Blog - CSS Справочник » Blog Archive » border-left

border-left

border-left

Браузер Internet Explorer Netscape Opera Safari Mozilla Firefox
Версия 5.5 6.0 7.0 7.0 8.0 7.0 8.0 9.0 2.0 3.0 1.7 1.0 2.0 3.0
Поддерживается Да Да Да Да Да Да Да Да Да Да Да Да Да Да

Краткая информация

CSS CSS1
Значение по умолчанию Зависит от используемых аргументов
Наследуется Нет
Применяется Ко всем элементам
Аналог HTML <img border > | <table border>
Ссылка на спецификацию http://www.w3.org/TR/CSS21/box.html#border-shorthand-properties

Описание

Параметр позволяет одновременно установить толщину, стиль и цвет левой границы
элемента. Значения могут идти в любом порядке, разделяясь пробелом, браузер
сам определит, какое из них соответствует нужному атрибуту.

Синтаксис

border-left: border-width || border-style || color

Аргументы

Значение border-width определяет толщину рамки.
Для управления видом рамки предоставляется восемь значений параметра border-style.
Их названия и результат действия представлен на рис. 1.

Стили рамок

Рис.1. Стили рамок

Первые два стиля — dotted и dashed
поддерживаются браузером Internet Explorer с версии 5.5.

Аргумент color устанавливает цвет рамки, значение
может быть в любом допустимом для CSS формате.

Пример

Валидный HTML Валидный CSS

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>

<meta http-equiv="Content-Type" content="text/html; charset=windows-1251">
<title>border-left</title>
<style type="text/css">
DIV.line {

border-left: 2px dotted green; /* Линия слева от текста */
padding-left: 10px; /* Расстояние между линией и текстом */
margin-left: 10px; /* Расстояние от левого края до линии */
}
</style>

</head>
<body>

<div class="line">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diem nonummy nibh euismod tincidunt ut lacreet dolore magna aliguam erat volutpat. Ut wisis enim ad minim veniam, quis nostrud exerci tution ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
</div>

</body>
</html>

Результат данного примера показан на рис. 2.

Рис. 2

Рис. 2. Применение свойства border-left

Объектная модель

[window.]document.getElementById("elementID").style.borderLeft

This entry was posted on Четверг, Август 21st, 2008 at 6:38 пп and is filed under border-left. Both comments and pings are currently closed.

Leave a Reply