границы ИНПУТА не видны в IE8
От: TheAteist  
Дата: 04.10.10 11:55
Оценка:
Имеется HTML и стиль:
<div class="contactFormElement">
<input type="text" class="contactFormElement" name="txtContact"/>
</div>
CSS: #divContactForm INPUT.contactFormElement {WIDTH: 140px; BORDER: 1px double #CCC;}

В IE8 границы ИНПУТА не видны, но стоит поменять "DOUBLE" на "SOLID" или другое, то границы ИНПУТА вновь видны.
Это происходит только в IE8, почему?

Спасибо
Re: границы ИНПУТА не видны в IE8
От: DuШes  
Дата: 04.10.10 12:42
Оценка:
Здравствуйте, TheAteist, Вы писали:

TA>Имеется HTML и стиль:

TA><div class="contactFormElement">
TA> <input type="text" class="contactFormElement" name="txtContact"/>
TA></div>
TA>CSS: #divContactForm INPUT.contactFormElement {WIDTH: 140px; BORDER: 1px double #CCC;}

TA>В IE8 границы ИНПУТА не видны, но стоит поменять "DOUBLE" на "SOLID" или другое, то границы ИНПУТА вновь видны.

TA>Это происходит только в IE8, почему?

TA>Спасибо


и не должны..
твой пример вообще кривой,
потому что CSS указал неправильно:
#divContactForm — ищет элемент с ID == divContactForm

в твоем случае (если делаешь привязку стиля по классу) нужно использовать .divContactForm, в твоем примере класс стиля вообще не определен (сравни contactFormElement для div)

если же речь идет о форме с id == #divContactForm, то стиль поправь на:
CSS: #divContactForm DIV INPUT.contactFormElement {WIDTH: 140px; BORDER: 1px double #CCC;}
Re: границы ИНПУТА не видны в IE8
От: DuШes  
Дата: 04.10.10 12:47
Оценка:
Здравствуйте, TheAteist, Вы писали:

TA>Имеется HTML и стиль:

TA><div class="contactFormElement">
TA> <input type="text" class="contactFormElement" name="txtContact"/>
TA></div>
TA>CSS: #divContactForm INPUT.contactFormElement {WIDTH: 140px; BORDER: 1px double #CCC;}

TA>В IE8 границы ИНПУТА не видны, но стоит поменять "DOUBLE" на "SOLID" или другое, то границы ИНПУТА вновь видны.

TA>Это происходит только в IE8, почему?

TA>Спасибо


вдогонку:
http://www.w3.org/TR/REC-CSS1/#border-style

обрати внимание на выделенное ...

5.5.17 'border-style'

Value: none | dotted | dashed | solid | double | groove | ridge | inset | outset
Initial: none
Applies to: all elements
Inherited: no
Percentage values: N/A

The 'border-style' property sets the style of the four borders. It can have from one to four values, and the values are set on the different sides as for 'border-width' above.

#xy34 { border-style: solid dotted }

In the above example, the horizontal borders will be 'solid' and the vertical borders will be 'dotted'.

Since the initial value of the border styles is 'none', no borders will be visible unless the border style is set.

The border styles mean:

none
no border is drawn (regardless of the 'border-width' value)
dotted
the border is a dotted line drawn on top of the background of the element
dashed
the border is a dashed line drawn on top of the background of the element
solid
the border is a solid line
double
the border is a double line drawn on top of the background of the element. The sum of the two single lines and the space between equals the <border-width> value

Re[2]: границы ИНПУТА не видны в IE8
От: TheAteist  
Дата: 04.10.10 19:07
Оценка:
Здравствуйте, DuШes, Вы писали:

DШ>и не должны..

DШ>твой пример вообще кривой,
DШ>потому что CSS указал неправильно:
DШ>#divContactForm — ищет элемент с ID == divContactForm

DШ>в твоем случае (если делаешь привязку стиля по классу) нужно использовать .divContactForm, в твоем примере класс стиля вообще не определен (сравни contactFormElement для div)


Так ведь я именно так и сделал "#divContactForm INPUT.contactFormElement {...}": ищет элемент с ID=#divContactForm, в нем ищет INPUT с классом contactFormElement и приписывает ему стиль который в скобках "{}"
Что же не правильно?

DШ>если же речь идет о форме с id == #divContactForm, то стиль поправь на:

DШ>CSS: #divContactForm DIV INPUT.contactFormElement {WIDTH: 140px; BORDER: 1px double #CCC;}
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.