Форум программистов, компьютерный форум, киберфорум
HTML, CSS
Войти
Регистрация
Восстановить пароль
Блоги Сообщество Поиск Заказать работу  
 
Рейтинг 4.60/15: Рейтинг темы: голосов - 15, средняя оценка - 4.60
1 / 1 / 1
Регистрация: 29.05.2015
Сообщений: 139

Форма обратной связи (ширина полей)

29.05.2015, 11:27. Показов 3039. Ответов 14
Метки нет (Все метки)

Студворк — интернет-сервис помощи студентам
Добрый день ребята помогите пож. не опытнопу разобраться с этой формой. Я не могу настроить ширишу поля имя и почты. Помоги пож

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>HTML5 Contact Form</title>
<link rel="stylesheet" media="screen" href="styles.css" >
</head>
<body>
<form class="contact_form" action="mail.php" method="post" name="contact_form">
<ul>
<li>
<label for="name"></label>
<input name="name" type="text" placeholder="Name:" required />
<input name="e_mail" type="text" placeholder="E-mail:" required />
</li>

<li>
<label for="message"></label>
<textarea name="text" cols="70" rows="11" placeholder= "Message:" required ></textarea>
</li>
<li>
<button class="submit" type="submit">Send a message</button>
</li>
</ul>
</form>
</body>
</html>

Добавлено через 16 минут

Хочу сделать чтоб поля в общем были пропорциональны всей ширине поля текстового сообщения, а также увеличить расстояние мужду полями имени и самого сообщения не несколько пикселей
0
IT_Exp
Эксперт
34794 / 4073 / 2104
Регистрация: 17.06.2006
Сообщений: 32,602
Блог
29.05.2015, 11:27
Ответы с готовыми решениями:

Форма обратной связи
помогите подключить к даной форме почту...уже больше 3 часов мучаюсь и никак не могу подключить... html файл: &lt;form...

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

Форма обратной связи
У меня есть вот такая вот форма обратной связи в виде картинки как можно её сверстать ?

14
 Аватар для Monster-95
53 / 53 / 26
Регистрация: 05.02.2013
Сообщений: 288
29.05.2015, 17:26
kravchuks,
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<style>
    .name, .email {
        width: 250px;
        margin-bottom: 5px;
    }
</style>
 
<form class="contact_form" action="mail.php" method="post" name="contact_form">
<ul>
<li>
<label for="name"></label>
<input class="name" name="name" type="text" placeholder="Name:" required />
<input class="email" name="e_mail" type="text" placeholder="E-mail:" required />
</li>
 
<li>
<label for="message"></label>
<textarea name="text" cols="70" rows="11" placeholder= "Message:" required ></textarea>
</li>
<li>
<button class="submit" type="submit">Send a message</button>
</li>
</ul>
</form>
0
1 / 1 / 1
Регистрация: 29.05.2015
Сообщений: 139
29.05.2015, 21:36  [ТС]
Monster-95, Спасибо уважаемый. Но тут проблемка возможно ли сохранить при этом стиль оформление как тут http://www.pagelayouts.net/contact-us.html но при этом чтоб оформление было такое сначала имя потом почта и ниже текстовое окно по ширине как имя и почта вместе как тут http://akvilon.byethost7.com/contact-us.html
Во вложении я вложил файлы как отправляется почта и как я понимаю стили к форме. Файлы mail.php и class.phpmailer.php
Миниатюры
Форма обратной связи (ширина полей)   Форма обратной связи (ширина полей)  
Вложения
Тип файла: rar Export.rar (9.8 Кб, 5 просмотров)
0
 Аватар для Monster-95
53 / 53 / 26
Регистрация: 05.02.2013
Сообщений: 288
29.05.2015, 22:03
kravchuks, Я вас честно не понял, вы это имели ввиду ?
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/* === Remove input autofocus webkit === */
*:focus {outline: none;}
 
/* === Form Typography === */
body {font: 14px/21px "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;}
.contact_form h2, .contact_form label {font-family:Georgia, Times, "Times New Roman", serif;}
.form_hint, .required_notification {font-size: 12px;}
 
/* === List Styles === */
.contact_form ul {
    width:450px;
    list-style-type:none;
    list-style-position:outside;
    margin:0px;
    padding:0px;
}
.contact_form li{
    padding:13px; 
    border-bottom:1px solid #eee;
    position:relative;
} 
.contact_form li:first-child, .contact_form li:last-child {
    border-bottom:1px solid #777;
}
 
/* === Form Header === */
.contact_form h2 {
    margin:0;
    display: inline;
}
.required_notification {
    color:#d45252; 
    margin:5px 0 0 0; 
    display:inline;
    float:right;
}
 
/* === Form Elements === */
.contact_form label {
    width:75px;
    margin-top: 3px;
    display:inline-block;
    float:left;
    padding:3px;
}
.contact_form input {
    height:25px; 
    width:330px; 
    padding:5px 8px;
}
.contact_form textarea {padding:8px; width:330px;}
.contact_form button {margin-left:156px;}
 
    /* form element visual styles */
    .contact_form input, .contact_form textarea { 
        border:1px solid #aaa;
        box-shadow: 0px 0px 3px #ccc, 0 10px 15px #eee inset;
        border-radius:2px;
        padding-right:30px;
        -moz-transition: padding .25s; 
        -webkit-transition: padding .25s; 
        -o-transition: padding .25s;
        transition: padding .25s;
    }
    .contact_form input:focus, .contact_form textarea:focus {
        background: #fff; 
        border:1px solid #555; 
        box-shadow: 0 0 3px #aaa; 
        padding-right:70px;
    }
 
/* === HTML5 validation styles === */   
.contact_form input:required, .contact_form textarea:required {
    background: #fff url(images/red_asterisk.png) no-repeat 98% center;
}
.contact_form input:required:valid, .contact_form textarea:required:valid {
    background: #fff url(images/valid.png) no-repeat 98% center;
    box-shadow: 0 0 5px #5cd053;
    border-color: #28921f;
}
.contact_form input:focus:invalid, .contact_form textarea:focus:invalid {
    background: #fff url(images/invalid.png) no-repeat 98% center;
    box-shadow: 0 0 5px #d45252;
    border-color: #b03535
}
 
/* === Form hints === */
.form_hint {
    background: #d45252;
    border-radius: 3px 3px 3px 3px;
    color: white;
    margin-left:8px;
    padding: 1px 6px;
    z-index: 999; /* hints stay above all other elements */
    position: absolute; /* allows proper formatting if hint is two lines */
    display: none;
}
.form_hint::before {
    content: "\25C0";
    color:#d45252;
    position: absolute;
    top:1px;
    left:-6px;
}
.contact_form input:focus + .form_hint {display: inline;}
.contact_form input:required:valid + .form_hint {background: #28921f;}
.contact_form input:required:valid + .form_hint::before {color:#28921f;}
    
/* === Button Style === */
button.submit {
    background-color: #68b12f;
    background: -webkit-gradient(linear, left top, left bottom, from(#68b12f), to(#50911e));
    background: -webkit-linear-gradient(top, #68b12f, #50911e);
    background: -moz-linear-gradient(top, #68b12f, #50911e);
    background: -ms-linear-gradient(top, #68b12f, #50911e);
    background: -o-linear-gradient(top, #68b12f, #50911e);
    background: linear-gradient(top, #68b12f, #50911e);
    border: 1px solid #509111;
    border-bottom: 1px solid #5b992b;
    border-radius: 3px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
    box-shadow: inset 0 1px 0 0 #9fd574;
    -webkit-box-shadow: 0 1px 0 0 #9fd574 inset ;
    -moz-box-shadow: 0 1px 0 0 #9fd574 inset;
    -ms-box-shadow: 0 1px 0 0 #9fd574 inset;
    -o-box-shadow: 0 1px 0 0 #9fd574 inset;
    color: white;
    font-weight: bold;
    padding: 6px 20px;
    text-align: center;
    text-shadow: 0 -1px 0 #396715;
}
button.submit:hover {
    opacity:.85;
    cursor: pointer; 
}
button.submit:active {
    border: 1px solid #20911e;
    box-shadow: 0 0 10px 5px #356b0b inset; 
    -webkit-box-shadow:0 0 10px 5px #356b0b inset ;
    -moz-box-shadow: 0 0 10px 5px #356b0b inset;
    -ms-box-shadow: 0 0 10px 5px #356b0b inset;
    -o-box-shadow: 0 0 10px 5px #356b0b inset;
    
}
</style>
</head>
<body>
<form class="contact_form" action="mail.php" method="post" name="contact_form">
    <ul>
      <li>
          <label for="name"><strong>Name:</strong></label>
          <input name="name" type="text"  placeholder="Name" required />
        </li>
        <li>
            <label for="email"><strong>Email:</strong></label>
            <input name="e_mail" type="text" placeholder="test@test.ru" required />
            <span class="form_hint">Proper format "name@something.com"</span>
        </li>
        <li>
            <label for="message"><strong>Message:</strong></label>
            <textarea name="text" cols="40" rows="6" placeholder= "The text message" required ></textarea>
        </li>
        <li>
            <button class="submit" type="submit">Send a message</button>
        </li>
    </ul>
</form>
</body>
</html>
1
1 / 1 / 1
Регистрация: 29.05.2015
Сообщений: 139
29.05.2015, 22:15  [ТС]
Monster-95, Да но чтоб вряд были поля имени и почты а под ними пропорционально ширине текстовое поле и ниже в левом углу кнопка отправить. Как тут только с оформлением.
Миниатюры
Форма обратной связи (ширина полей)  
0
1 / 1 / 1
Регистрация: 29.05.2015
Сообщений: 139
29.05.2015, 22:25  [ТС]
Вот к примеру еще один вар кот я хочу сделать http://www.templatemonster.com/demo/45825.html
0
Эксперт HTML/CSS
 Аватар для Fedor92
2964 / 2621 / 1068
Регистрация: 15.12.2012
Сообщений: 10,091
Записей в блоге: 11
29.05.2015, 22:44
kravchuks, и что Вам мешает её запилить?
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<style type="text/css">
/* === Remove input autofocus webkit === */
*:focus {outline: none;}
 
/* === Form Typography === */
body {font: 14px/21px "Lucida Sans", "Lucida Grande", "Lucida Sans Unicode", sans-serif;}
.contact_form h2, .contact_form label {font-family:Georgia, Times, "Times New Roman", serif;}
.form_hint, .required_notification {font-size: 12px;}
form{width:820px; height:auto; margin:0 auto;}
 
/* === List Styles === */
.contact_form ul {
    list-style-type:none;
    list-style-position:outside;
    margin:0px;
    padding:0px;
}
.contact_form li{
    padding:13px; 
    position:relative;
} 
 
/* === Form Header === */
.contact_form h2 {
    margin:0;
    display: inline;
}
.required_notification {
    color:#d45252; 
    margin:5px 0 0 0; 
    display:inline;
    float:right;
}
 
/* === Form Elements === */
.contact_form label {
    width:75px;
    margin-top: 3px;
    display:inline-block;
    float:left;
    padding:3px;
}
.contact_form input {
    height:25px; 
    width:330px; 
    padding:5px 8px;
}
.contact_form textarea {padding:8px; width:705px; height:300px}
 
    /* form element visual styles */
    .contact_form input, .contact_form textarea { 
        border:1px solid #aaa;
        box-shadow: 0px 0px 3px #ccc, 0 10px 15px #eee inset;
        border-radius:2px;
        padding-right:30px;
        -moz-transition: padding .25s; 
        -webkit-transition: padding .25s; 
        -o-transition: padding .25s;
        transition: padding .25s;
    }
    .contact_form input:focus, .contact_form textarea:focus {
        background: #fff; 
        border:1px solid #555; 
        box-shadow: 0 0 3px #aaa; 
        padding-right:70px;
    }
 
/* === HTML5 validation styles === */   
.contact_form input:required, .contact_form textarea:required {
    background: #fff url(images/red_asterisk.png) no-repeat 98% center;
}
.contact_form input:required:valid, .contact_form textarea:required:valid {
    background: #fff url(images/valid.png) no-repeat 98% center;
    box-shadow: 0 0 5px #5cd053;
    border-color: #28921f;
}
.contact_form input:focus:invalid, .contact_form textarea:focus:invalid {
    background: #fff url(images/invalid.png) no-repeat 98% center;
    box-shadow: 0 0 5px #d45252;
    border-color: #b03535
}
 
/* === Form hints === */
.form_hint {
    background: #d45252;
    border-radius: 3px 3px 3px 3px;
    color: white;
    margin-left:8px;
    padding: 1px 6px;
    z-index: 999; /* hints stay above all other elements */
    position: absolute; /* allows proper formatting if hint is two lines */
    display: none;
}
.form_hint::before {
    content: "\25C0";
    color:#d45252;
    position: absolute;
    top:1px;
    left:-6px;
}
.contact_form input:focus + .form_hint {display: inline;}
.contact_form input:required:valid + .form_hint {background: #28921f;}
.contact_form input:required:valid + .form_hint::before {color:#28921f;}
    
/* === Button Style === */
button.submit {
    background-color: #68b12f;
    background: -webkit-gradient(linear, left top, left bottom, from(#68b12f), to(#50911e));
    background: -webkit-linear-gradient(top, #68b12f, #50911e);
    background: -moz-linear-gradient(top, #68b12f, #50911e);
    background: -ms-linear-gradient(top, #68b12f, #50911e);
    background: -o-linear-gradient(top, #68b12f, #50911e);
    background: linear-gradient(top, #68b12f, #50911e);
    border: 1px solid #509111;
    border-bottom: 1px solid #5b992b;
    border-radius: 3px;
    -webkit-border-radius: 3px;
    -moz-border-radius: 3px;
    -ms-border-radius: 3px;
    -o-border-radius: 3px;
    box-shadow: inset 0 1px 0 0 #9fd574;
    -webkit-box-shadow: 0 1px 0 0 #9fd574 inset ;
    -moz-box-shadow: 0 1px 0 0 #9fd574 inset;
    -ms-box-shadow: 0 1px 0 0 #9fd574 inset;
    -o-box-shadow: 0 1px 0 0 #9fd574 inset;
    color: white;
    font-weight: bold;
    padding: 6px 20px;
    text-align: center;
    text-shadow: 0 -1px 0 #396715;
}
button.submit:hover {
    opacity:.85;
    cursor: pointer; 
}
button.submit:active {
    border: 1px solid #20911e;
    box-shadow: 0 0 10px 5px #356b0b inset; 
    -webkit-box-shadow:0 0 10px 5px #356b0b inset ;
    -moz-box-shadow: 0 0 10px 5px #356b0b inset;
    -ms-box-shadow: 0 0 10px 5px #356b0b inset;
    -o-box-shadow: 0 0 10px 5px #356b0b inset;
    
}
</style>
</head>
<body>
<form class="contact_form" action="mail.php" method="post" name="contact_form">
    <ul>
      <li>
          <input name="name" type="text"  placeholder="Name" required />
          <input name="e_mail" type="text" placeholder="E-mail" required />
        </li>
        <li>
            <textarea name="text" cols="40" rows="6" placeholder= "The text message" required ></textarea>
        </li>
        <li>
            <button class="submit" type="submit">Send a message</button>
        </li>
    </ul>
</form>
</body>
</html>
1
1 / 1 / 1
Регистрация: 29.05.2015
Сообщений: 139
29.05.2015, 22:44  [ТС]
Спасибо ув. сейчас мешает только опыт. Но у меня получается вот так
Миниатюры
Форма обратной связи (ширина полей)  
0
 Аватар для Monster-95
53 / 53 / 26
Регистрация: 05.02.2013
Сообщений: 288
29.05.2015, 22:45
kravchuks,
HTML5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <style type="text/css">
 
        .name, .email {
            box-shadow: 0 0 2px rgba(0,0,0,0.2);
            width: 250px;
            margin-bottom: 5px;
            border-radius: 5px;
            border: 1px solid #ccc;
            padding: 5px;
        }
        .text_mess {
            box-shadow: 0 0 2px rgba(0,0,0,0.2);
            width: 516px;
            height: 200px;
            border-radius: 5px;
            border: 1px solid #ccc;
            padding: 5px;
        }
        .submit {
            box-shadow: 0 0 2px rgba(0,0,0,0.2);
            border: 1px solid #ccc;
            border-radius: 4px;
            cursor: pointer;
            padding: 5px;
        }
        .submit:hover {
            background: #F7BE81;
            border: none;
            padding: 6px;
        }
    </style>
<body>
    <form action="mail.php" method="post" name="contact_form">
        <div>
            <input class="name" name="name" type="text" placeholder="Name:"  />
            <input class="email" name="e_mail" type="text" placeholder="E-mail:" />
        </div>
        <div><textarea class="text_mess" name="text" placeholder= "Message:"></textarea></div>
        <button class="submit" type="submit">Send a message</button>
    </form>
</body>
</html>
0
Эксперт HTML/CSS
 Аватар для Fedor92
2964 / 2621 / 1068
Регистрация: 15.12.2012
Сообщений: 10,091
Записей в блоге: 11
29.05.2015, 22:46
kravchuks, ну так набирайтесь опыта, посмотрите код, который я выложил и будет Вам счастье...
0
 Аватар для Monster-95
53 / 53 / 26
Регистрация: 05.02.2013
Сообщений: 288
29.05.2015, 22:48
Fedor92, А я что выложил ?
0
29.05.2015, 22:49

Не по теме:

Monster-95, что Вы не знаю, но форма явно не стилизована...:D Как говорится найдите 10 отличий...:)

0
1 / 1 / 1
Регистрация: 29.05.2015
Сообщений: 139
29.05.2015, 22:54  [ТС]
Стараюь, плохо у меня с кодами. Спасибо попробую разобратся. Monster-95, ваш посл код лежит нормально не меняя форму правда дейст без стилей.
0
 Аватар для Monster-95
53 / 53 / 26
Регистрация: 05.02.2013
Сообщений: 288
29.05.2015, 22:56
kravchuks, Этот код я набросал на скорую руку, там все настолько просто что теперь дело за вами, и вашими фантазиями.
0
1 / 1 / 1
Регистрация: 29.05.2015
Сообщений: 139
29.05.2015, 23:01  [ТС]
Monster-95, Fedor92, и на том спасибо помогли.
0
Надоела реклама? Зарегистрируйтесь и она исчезнет полностью.
BasicMan
Эксперт
29316 / 5623 / 2384
Регистрация: 17.02.2009
Сообщений: 30,364
Блог
29.05.2015, 23:01
Помогаю со студенческими работами здесь

Форма обратной связи
Как завернуть, чтобы параметры калькулятора приходили мне на почту? Строки, которые отвечают за параметры: &lt;p...

Форма обратной связи
Подскажите как сделать форму обратной связи(почты). Вот мой скайп timoha11266

Форма обратной связи
Создал форму обратной связи на html. Как сделать все поля обязательными для заполнения? Как добавить капчу? В заранее спасибо!!

Форма обратной связи
Помогите сверстать форму обратной связи с нуля по картинке? В кодах новичек.

Форма обратной связи
Здравствуйте. Подскажите что не так с моей формой. Пользователь должен ввести имя и номер телефона, которые отправляются на мейл. Html...


Искать еще темы с ответами

Или воспользуйтесь поиском по форуму:
15
Ответ Создать тему
Новые блоги и статьи
http://iceja.net/ сервер решения полиномов
iceja 18.01.2026
Выкатила http:/ / iceja. net/ сервер решения полиномов (находит действительные корни полиномов методом Штурма). На сайте документация по API, но скажу прямо VPS слабенький и 200 000 полиномов. . .
Первый деплой
lagorue 16.01.2026
Не спеша развернул своё 1ое приложение в kubernetes. А дальше мне интересно создать 1фронтэнд приложения и 2 бэкэнд приложения развернуть 2 деплоя в кубере получится 2 сервиса и что-бы они. . .
Расчёт переходных процессов в цепи постоянного тока
igorrr37 16.01.2026
/ * Дана цепь постоянного тока с R, L, C, k(ключ), U, E, J. Программа составляет систему уравнений по 1 и 2 законам Кирхгофа, решает её и находит: токи, напряжения и их 1 и 2 производные при t = 0;. . .
Восстановить юзерскрипты Greasemonkey из бэкапа браузера
damix 15.01.2026
Если восстановить из бэкапа профиль Firefox после переустановки винды, то список юзерскриптов в Greasemonkey будет пустым. Но восстановить их можно так. Для этого понадобится консольная утилита. . .
Изучаю kubernetes
lagorue 13.01.2026
А пригодятся-ли мне знания kubernetes в России?
Сукцессия микоризы: основная теория в виде двух уравнений.
anaschu 11.01.2026
https:/ / rutube. ru/ video/ 7a537f578d808e67a3c6fd818a44a5c4/
WordPad для Windows 11
Jel 10.01.2026
WordPad для Windows 11 — это приложение, которое восстанавливает классический текстовый редактор WordPad в операционной системе Windows 11. После того как Microsoft исключила WordPad из. . .
Classic Notepad for Windows 11
Jel 10.01.2026
Old Classic Notepad for Windows 11 Приложение для Windows 11, позволяющее пользователям вернуть классическую версию текстового редактора «Блокнот» из Windows 10. Программа предоставляет более. . .
КиберФорум - форум программистов, компьютерный форум, программирование
Powered by vBulletin
Copyright ©2000 - 2026, CyberForum.ru