JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">
<div class="image">
<img src="http://s1.ipicture.ru/uploads/20130321/TbP3oGLD.jpg" />
</div>
<div id="menu">
<a href=#>Первая</a>
<a href=#>Вторая</a>
<a href=#>Третья</a>
<a href=#>Четвертая</a>
</div>
<div class="control">
<div class="select">
<select id="select">
<option value="brown">Изменить фон меню на коричневый</option>
<option value="red">Изменить фон меню на красный</option>
<option value="green">Изменить фон меню на зеленый</option>
<option value="default">Вернуть на начальное значение</option>
</select>
</div>
<div class="button">
<div id="choose">Выполнить</div>
</div>
</div>
</div>
CSS
/*
I decided to use CSS3 to make page more beautiful.
It will work in IE 7,8, but not as beautiful as in modern browsers.
I.e. box-shadow, border-radius and gradients will not work in the IE 7,8
*/
body{
min-width: 600px;
background: url(http://s019.radikal.ru/i617/1303/3e/f3ec9b349447.png);
}
body, select, button{
font-family: Verdana, Arial, sans-serif;
}
.image{
margin: 0 auto;
margin-top: 100px;
margin-bottom: 10px;
width: 420px;
}
img{
border-radius: 10px;
box-shadow: 1px 1px 6px rgba(0, 0, 0, .6);
}
#menu{
text-align: center;
}
a{
padding: 10px 25px;
line-height: 50px;
background: #556A73;
border: 1px solid #404040;
text-decoration: none;
margin: 0;
border-radius: 5px;
}
a:link{
color: white;
box-shadow: 1px 1px 4px rgba(0, 0, 0, .7);
}
a:visited{
color: white;
}
a:hover{
background-color: #F2C9BB;
color: #A6212C;
}
.control{
width: 500px;
margin: 0 auto;
}
.select{
margin-top: 10px;
margin-left: 25px;
padding-right: 10px;
float: left;
}
select{
font-size: 1em;
padding: 5px;
border-radius: 4px;
border: 1px solid silver;
cursor: pointer;
outline-color: silver;
color: #606060;
}
select:hover{
text-shadow: 1px 1px 1px silver;
}
.button{
margin-top: 13px;
float: left;
cursor: pointer;
}
#choose {
padding: 5px;
text-shadow: 0 1px 1px rgba(0,0,0,.2);
-webkit-border-radius: 5px;
-moz-border-radius: 5px;
border-radius: 5px;
-webkit-box-shadow: 0 1px 2px rgba(0,0,0,.2);
-moz-box-shadow: 0 1px 2px rgba(0,0,0,.2);
box-shadow: 0 1px 2px rgba(0,0,0,.2);
color: #606060;
border: solid 1px #b7b7b7;
background: #fff;
background: -webkit-gradient(linear, left top, left bottom, from(#fff), to(#ededed));
background: -moz-linear-gradient(top, #fff, #ededed);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff',...
JavaScript
window.onload = function () {
var select, color, menu;
select = document.getElementById('select');
// I found beautiful cross-browser solution: http://stackoverflow.com/questions/1695376/msie-and-addeventlistener-problem-in-javascript
function bindEvent(el, eventName, eventHandler) {
if (el.addEventListener) {
el.addEventListener(eventName, eventHandler, false);
} else if (el.attachEvent) {
el.attachEvent('on' + eventName, eventHandler);
}
}
bindEvent(document.getElementById('choose'), 'click', function () {
console.log(1);
});
bindEvent(document.getElementById('choose'), 'click', function () {
console.log(2);
});
};