質問編集履歴
2
体裁の修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -69,8 +69,8 @@
|
|
69
69
|
</html>
|
70
70
|
|
71
71
|
```
|
72
|
+
```
|
72
|
-
|
73
|
+
/sm-blue.css
|
73
|
-
/
|
74
74
|
|
75
75
|
.sm-blue {
|
76
76
|
background: #ffd900; /* Old browsers */
|
1
html部分の修正を行いました
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,57 +1,29 @@
|
|
1
1
|
テンプレートを利用して、大・中・小項目のあるリストを横並べしようとしたところ、
|
2
2
|
元々の5つの項目から一つ減らし、4つの大項目による横並べを行いたいのですが
|
3
3
|
htmlファイルの項目を減らし
|
4
|
-
|
4
|
+
|
5
|
-
.menutop {
|
6
|
-
__width: 19.85%;__
|
7
|
-
text-align: center;
|
8
|
-
font-size: 18px;
|
9
|
-
}**
|
10
|
-
|
5
|
+
sm-blue.css中のwidthを変更して対応したところ、一見うまくいったように見えるのですが、ブラウザの大きさを変更すると5つある状態に戻ってしまいます。
|
11
6
|
どこを変更すればきれいにcategory3までを表示できるようになるのでしょうか
|
12
7
|
ご教示いただけますと幸いです。
|
13
8
|
|
14
|
-
|
15
|
-
|
16
|
-
|
9
|
+
```index.html
|
17
|
-
|
18
10
|
<!DOCTYPE html>
|
19
11
|
<html lang="ja">
|
20
12
|
<head>
|
21
13
|
<meta charset="utf-8" />
|
22
|
-
<title>
|
14
|
+
<title>test</title>
|
23
15
|
<meta name="Description" content="ここにキーワードを含むページの説明文を記入" />
|
24
16
|
<meta name="Keywords" content="キーワード,キーワード,キーワード" />
|
25
17
|
<meta name="viewport" content="width=device-width; initial-scale=1, minimum-scale=1, maximum-scale=1, user-scalable=no" />
|
26
|
-
<link rel="icon" href="http://saetl.net/favicon.ico" type="image/x-icon" />
|
27
|
-
<link rel="shortcut icon" type="img/x-icon" href="http://saetl.net/favicon.ico" />
|
28
|
-
<link rel="stylesheet" href="css/style.css">
|
29
18
|
<link rel="stylesheet" href="css/sm-core-css.css"> <!--中央上のメインメニュー-->
|
30
19
|
<link rel="stylesheet" href="css/sm-blue.css"> <!--中央上のメインメニュー-->
|
31
|
-
<link rel="stylesheet" href="css/lightbox.css"> <!--画像拡大-->
|
32
|
-
<link rel="stylesheet" href="css/hovereffects.css"> <!--ホバーエフェクト-->
|
33
|
-
<link href='http://fonts.googleapis.com/css?family=Ceviche+One|Artifika' rel='stylesheet' type='text/css'> <!--googleのwebフォント-->
|
34
|
-
<!--[if lt IE 9]>
|
35
|
-
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
36
|
-
<script src="http://css3-mediaqueries-js.googlecode.com/svn/trunk/css3-mediaqueries.js"></script>
|
37
|
-
<![endif]-->
|
38
20
|
</head>
|
39
21
|
|
40
22
|
<body>
|
41
|
-
|
42
|
-
<noscript>
|
43
|
-
<p>※このページはJavaScriptを使用しています。JavaScript設定を有効にしてご覧ください。</p>
|
44
|
-
</noscript>
|
45
|
-
|
46
|
-
|
47
23
|
<div id="wrapper">
|
48
24
|
<div id="contents">
|
49
|
-
|
50
|
-
<!-- ページの中央部分 -->
|
51
25
|
<div id="column1">
|
52
26
|
<div id="column1_inner">
|
53
|
-
|
54
|
-
<!-- ナビゲーションメニュー(ヘッダーの下のメインメニュー)ー-->
|
55
27
|
<ul id="main-menu" class="sm sm-blue">
|
56
28
|
<li class="menutop"><a href="index.html">home</a>
|
57
29
|
<li class="menutop"><a href="#">category1</a>
|
@@ -63,17 +35,16 @@
|
|
63
35
|
<li class="menusub"><a href="#">subcategory2</a>
|
64
36
|
<li class="menusub"><a href="#">subcategory3</a>
|
65
37
|
</ul>
|
66
|
-
<li class="menutop"><a href="
|
38
|
+
<li class="menutop"><a href="#">category2</a>
|
67
39
|
<li class="menutop"><a href="#">category3</a>
|
68
40
|
<ul>
|
69
|
-
|
41
|
+
|
70
|
-
<li class="menusub"><a href="#">subcategory2</a>
|
71
|
-
<li class="menusub"><a href="#">subcategory3</a>
|
72
42
|
</ul>
|
43
|
+
</li>
|
73
|
-
|
44
|
+
<li class="menutop"><a href="#">category4</a>
|
45
|
+
</li>
|
74
46
|
</ul>
|
75
|
-
|
47
|
+
<!-- / #wrapper -->
|
76
|
-
|
77
48
|
</div>
|
78
49
|
|
79
50
|
<!-- javascript設定 -->
|
@@ -97,114 +68,228 @@
|
|
97
68
|
</body>
|
98
69
|
</html>
|
99
70
|
|
71
|
+
```
|
100
|
-
|
72
|
+
```sm-blue.css
|
73
|
+
/
|
101
74
|
|
102
|
-
/* SmartMenus Core CSS (it's not recommended editing this)
|
103
|
-
===============================================================*/
|
104
|
-
|
105
|
-
.sm, .sm ul, .sm li {
|
106
|
-
|
75
|
+
.sm-blue {
|
76
|
+
background: #ffd900; /* Old browsers */
|
77
|
+
background: -moz-linear-gradient(top, #ffd900 0%, #ffdb14 100%); /* FF3.6+ */
|
78
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ffd900), color-stop(100%,#ffdb14)); /* Chrome,Safari4+ */
|
79
|
+
background: -webkit-linear-gradient(top, #ffd900 0%,#ffdb14 100%); /* Chrome10+,Safari5.1+ */
|
80
|
+
background: -o-linear-gradient(top, #ffd900 0%,#ffdb14 100%); /* Opera 11.10+ */
|
81
|
+
background: -ms-linear-gradient(top, #ffd900 0%,#ffdb14 100%); /* IE10+ */
|
82
|
+
background: linear-gradient(to bottom, #ffd900 0%,#ffdb14 100%); /* W3C */
|
83
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffd900', endColorstr='#ffdb14',GradientType=0 ); /* IE6-9 */
|
107
|
-
|
84
|
+
-moz-box-shadow:0 1px 1px rgba(0,0,0,0.3);
|
108
|
-
|
85
|
+
-webkit-box-shadow:0 1px 1px rgba(0,0,0,0.3);
|
109
|
-
margin:0;
|
110
|
-
|
86
|
+
box-shadow:0 1px 1px rgba(0,0,0,0.3);
|
111
|
-
direction:ltr;
|
112
87
|
}
|
113
88
|
|
114
|
-
|
89
|
+
.sm-blue ul {
|
90
|
+
border:1px solid #a9a9a9;
|
115
|
-
|
91
|
+
padding:7px 0;
|
92
|
+
background:#fff;
|
93
|
+
-moz-border-radius:0 0 4px 4px;
|
94
|
+
-webkit-border-radius:0 0 4px 4px;
|
95
|
+
border-radius:0 0 4px 4px;
|
96
|
+
-moz-box-shadow:0 5px 12px rgba(0,0,0,0.3);
|
97
|
+
-webkit-box-shadow:0 5px 12px rgba(0,0,0,0.3);
|
98
|
+
box-shadow:0 5px 12px rgba(0,0,0,0.3);
|
116
99
|
}
|
117
100
|
|
118
|
-
ul.sm a {
|
119
|
-
position:relative;
|
120
|
-
display:block;
|
121
|
-
}
|
122
101
|
|
123
|
-
ul.sm a.disabled {
|
124
|
-
|
102
|
+
/* Menu items
|
125
|
-
|
103
|
+
===================*/
|
126
104
|
|
127
|
-
|
105
|
+
.sm-blue a {
|
106
|
+
padding:10px 0 14px;
|
107
|
+
color:#333;
|
108
|
+
line-height:23px;
|
109
|
+
font-family:"PT Sans Narrow", "Arial Narrow", Arial, Helvetica, sans-serif;
|
128
|
-
|
110
|
+
font-weight:bold;
|
129
|
-
|
111
|
+
text-decoration:none;
|
130
|
-
|
112
|
+
text-shadow:0 1px 0 rgba(0,0,0,0.3);
|
131
|
-
|
113
|
+
text-transform: capitalize;
|
132
114
|
}
|
133
115
|
|
116
|
+
.sm-blue a:hover, .sm-blue a:focus, .sm-blue a:active, .sm-blue a.highlighted {
|
134
|
-
|
117
|
+
background: #f8b500; /* Old browsers */
|
118
|
+
background: -moz-linear-gradient(top, #f8b500 0%, #f7b613 100%); /* FF3.6+ */
|
119
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8b500), color-stop(100%,#f7b613)); /* Chrome,Safari4+ */
|
120
|
+
background: -webkit-linear-gradient(top, #f8b500 0%,#f7b613 100%); /* Chrome10+,Safari5.1+ */
|
121
|
+
background: -o-linear-gradient(top, #f8b500 0%,#f7b613 100%); /* Opera 11.10+ */
|
122
|
+
background: -ms-linear-gradient(top, #f8b500 0%,#f7b613 100%); /* IE10+ */
|
123
|
+
background: linear-gradient(to bottom, #f8b500 0%,#f7b613 100%); /* W3C */
|
124
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8b500', endColorstr='#f7b613',GradientType=0 ); /* IE6-9 */
|
135
|
-
|
125
|
+
color:#333;
|
136
126
|
}
|
137
127
|
|
138
|
-
|
128
|
+
.sm-blue ul a {
|
129
|
+
padding:9px 40px 8px 23px;
|
130
|
+
background:transparent;
|
131
|
+
color:#637d4d;
|
132
|
+
font-size:16px;
|
139
|
-
|
133
|
+
text-shadow:none;
|
140
134
|
}
|
141
135
|
|
136
|
+
.sm-blue ul a:hover, .sm-blue ul a:focus, .sm-blue ul a:active, .sm-blue ul a.highlighted {
|
137
|
+
background: #f8b500; /* Old browsers */
|
138
|
+
background: -moz-linear-gradient(top, #f8b500 0%, #f7b613 100%); /* FF3.6+ */
|
139
|
+
background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8b500), color-stop(100%,#f7b613)); /* Chrome,Safari4+ */
|
140
|
+
background: -webkit-linear-gradient(top, #f8b500 0%,#f7b613 100%); /* Chrome10+,Safari5.1+ */
|
141
|
+
background: -o-linear-gradient(top, #f8b500 0%,#f7b613 100%); /* Opera 11.10+ */
|
142
|
+
background: -ms-linear-gradient(top, #f8b500 0%,#f7b613 100%); /* IE10+ */
|
143
|
+
background: linear-gradient(to bottom, #f8b500 0%,#f7b613 100%); /* W3C */
|
144
|
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f8b500', endColorstr='#f7b613',GradientType=0 ); /* IE6-9 */
|
142
|
-
|
145
|
+
color:#fff;
|
143
|
-
|
146
|
+
text-shadow:0 1px 0 rgba(0,0,0,0.3);
|
144
147
|
}
|
145
148
|
|
149
|
+
|
150
|
+
/* Sub menu indicators
|
151
|
+
===================*/
|
152
|
+
|
146
|
-
|
153
|
+
.sm-blue a span.sub-arrow {
|
147
|
-
|
154
|
+
position:absolute;
|
155
|
+
bottom:2px;
|
156
|
+
left:50%;
|
157
|
+
margin-left:-5px;
|
158
|
+
/* we will use one-side border to create a triangle so that we don't use a real background image, of course, you can use a real image if you like too */
|
159
|
+
width:0;
|
160
|
+
height:0;
|
161
|
+
overflow:hidden;
|
162
|
+
border-width:5px; /* tweak size of the arrow */
|
163
|
+
border-style:solid dashed dashed dashed;
|
164
|
+
border-color:#333 transparent transparent transparent;
|
148
165
|
}
|
149
166
|
|
150
|
-
|
167
|
+
.sm-blue-vertical a span.sub-arrow, .sm-blue ul a span.sub-arrow {
|
151
|
-
|
168
|
+
bottom:auto;
|
169
|
+
top:50%;
|
170
|
+
margin-top:-5px;
|
152
|
-
|
171
|
+
right:15px;
|
172
|
+
left:auto;
|
173
|
+
margin-left:0;
|
174
|
+
border-style:dashed dashed dashed solid;
|
175
|
+
border-color:transparent transparent transparent #aaa;
|
153
176
|
}
|
154
177
|
|
178
|
+
/* Items separators
|
179
|
+
===================*/
|
180
|
+
|
155
|
-
|
181
|
+
.sm-blue li {
|
156
|
-
|
182
|
+
border-left:1px solid #f8b500;
|
157
|
-
width:auto;
|
158
183
|
}
|
159
184
|
|
160
|
-
|
185
|
+
.sm-blue li:first-child, .sm-blue-vertical li, .sm-blue ul li {
|
161
|
-
|
186
|
+
border-left:0;
|
162
|
-
width:100%;
|
163
187
|
}
|
164
188
|
|
189
|
+
/* Scrolling arrows containers for tall sub menus - test sub menu: "Sub test" -> "more..." -> "more..." in the default download package
|
190
|
+
===================*/
|
191
|
+
|
165
|
-
|
192
|
+
.sm-blue span.scroll-up, .sm-blue span.scroll-down {
|
193
|
+
position:absolute;
|
166
|
-
|
194
|
+
display:none;
|
195
|
+
visibility:hidden;
|
196
|
+
overflow:hidden;
|
197
|
+
background:#ffffff;
|
198
|
+
height:20px;/* width and position will be automatically set by the script */
|
167
199
|
}
|
168
200
|
|
169
|
-
ul.sm:after {
|
170
|
-
|
201
|
+
.sm-blue span.scroll-up-arrow, .sm-blue span.scroll-down-arrow {
|
171
|
-
|
202
|
+
position:absolute;
|
203
|
+
top:-2px;
|
204
|
+
left:50%;
|
205
|
+
margin-left:-8px;
|
206
|
+
/* we will use one-side border to create a triangle so that we don't use a real background image, of course, you can use a real image if you like too */
|
207
|
+
width:0;
|
172
208
|
height:0;
|
173
|
-
font:0/0 serif;
|
174
|
-
clear:both;
|
175
|
-
visibility:hidden;
|
176
209
|
overflow:hidden;
|
210
|
+
border-width:8px; /* tweak size of the arrow */
|
211
|
+
border-style:dashed dashed solid dashed;
|
212
|
+
border-color:transparent transparent #637d4d transparent;
|
177
213
|
}
|
178
214
|
|
179
|
-
|
215
|
+
.sm-blue span.scroll-down-arrow {
|
180
|
-
|
216
|
+
top:6px;
|
217
|
+
border-style:solid dashed dashed dashed;
|
218
|
+
border-color:#637d4d transparent transparent transparent;
|
181
219
|
}
|
182
220
|
|
221
|
+
|
222
|
+
/*
|
223
|
+
---------------------------------------------------------------
|
224
|
+
Responsiveness
|
225
|
+
These will make the sub menus collapsible when the screen width is too small.
|
226
|
+
---------------------------------------------------------------*/
|
227
|
+
|
228
|
+
|
229
|
+
/* decrease horizontal main menu items left/right padding to avoid wrapping */
|
230
|
+
@media screen and (min-width: 1130px) {
|
231
|
+
.menutop {
|
232
|
+
width: 19.85%;
|
183
|
-
|
233
|
+
text-align: center;
|
184
|
-
|
234
|
+
font-size: 18px;
|
185
235
|
}
|
236
|
+
}
|
237
|
+
@media screen and (min-width: 769px) and (max-width: 1129px) {
|
238
|
+
.menutop {
|
239
|
+
width: 19.7%;
|
240
|
+
text-align: center;
|
241
|
+
font-size: 15px;
|
242
|
+
}
|
243
|
+
}
|
244
|
+
@media screen and (min-width: 481px) and (max-width: 768px) {
|
245
|
+
.menutop {
|
246
|
+
width: 19.5%;
|
247
|
+
text-align: center;
|
248
|
+
font-size: 13px;
|
249
|
+
}
|
250
|
+
}
|
251
|
+
@media screen and (max-width: 480px) {
|
186
252
|
|
187
|
-
|
253
|
+
/* The following will make the sub menus collapsible for small screen devices (it's not recommended editing these) */
|
254
|
+
ul.sm-blue {
|
188
|
-
|
255
|
+
width:auto !important;
|
256
|
+
margin: 10px !important;
|
189
|
-
-
|
257
|
+
margin-top: 250px !important;
|
190
|
-
box-sizing:content-box;
|
191
258
|
}
|
192
259
|
|
193
|
-
ul.sm {
|
260
|
+
ul.sm-blue ul {
|
261
|
+
display:none;
|
262
|
+
position:static !important;
|
263
|
+
top:auto !important;
|
264
|
+
left:auto !important;
|
265
|
+
margin-left:0 !important;
|
194
|
-
-
|
266
|
+
margin-top:0 !important;
|
267
|
+
width:auto !important;
|
268
|
+
min-width:0 !important;
|
269
|
+
max-width:none !important;
|
195
270
|
}
|
196
271
|
|
197
|
-
.
|
272
|
+
ul.sm-blue>li {
|
198
|
-
|
273
|
+
float:none;
|
199
|
-
padding:5px 20px;
|
200
274
|
}
|
201
275
|
|
276
|
+
ul.sm-blue>li>a, ul.sm-blue ul.sm-nowrap>li>a {
|
277
|
+
white-space:normal;
|
278
|
+
}
|
202
279
|
|
203
|
-
|
280
|
+
ul.sm-blue iframe {
|
281
|
+
display:none;
|
282
|
+
}
|
204
283
|
|
205
|
-
/
|
284
|
+
/
|
206
|
-
===============================================================*/
|
207
285
|
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
```
|
290
|
+
```
|
291
|
+
sm-core-css.css
|
292
|
+
|
208
293
|
.sm, .sm ul, .sm li {
|
209
294
|
display:block;
|
210
295
|
list-style:none;
|
@@ -238,37 +323,6 @@
|
|
238
323
|
float:left;
|
239
324
|
}
|
240
325
|
|
241
|
-
ul.sm ul li, ul.sm-vertical li {
|
242
|
-
float:none;
|
243
|
-
}
|
244
|
-
|
245
|
-
ul.sm a {
|
246
|
-
white-space:nowrap;
|
247
|
-
}
|
248
|
-
|
249
|
-
ul.sm ul a, ul.sm-vertical a {
|
250
|
-
white-space:normal;
|
251
|
-
}
|
252
|
-
|
253
|
-
* html ul.sm-vertical li {
|
254
|
-
float:left;
|
255
|
-
width:100%;
|
256
|
-
}
|
257
|
-
|
258
|
-
* html ul.sm-vertical ul li {
|
259
|
-
float:none;
|
260
|
-
width:auto;
|
261
|
-
}
|
262
|
-
|
263
|
-
*:first-child+html ul.sm-vertical>li {
|
264
|
-
float:left;
|
265
|
-
width:100%;
|
266
|
-
}
|
267
|
-
|
268
|
-
ul.sm ul.sm-nowrap>li>a {
|
269
|
-
white-space:nowrap;
|
270
|
-
}
|
271
|
-
|
272
326
|
ul.sm:after {
|
273
327
|
content:"\00a0";
|
274
328
|
display:block;
|
@@ -279,25 +333,8 @@
|
|
279
333
|
overflow:hidden;
|
280
334
|
}
|
281
335
|
|
282
|
-
* html ul.sm {
|
283
|
-
height:1px;
|
284
|
-
}
|
285
336
|
|
286
|
-
*:first-child+html ul.sm {
|
287
|
-
min-height:1px;
|
288
|
-
}
|
289
337
|
|
290
|
-
ul.sm li *, ul.sm li *:before, ul.sm li *:after {
|
291
|
-
-moz-box-sizing:content-box;
|
292
|
-
-webkit-box-sizing:content-box;
|
293
|
-
box-sizing:content-box;
|
294
|
-
}
|
295
338
|
|
296
|
-
ul.sm {
|
297
|
-
-webkit-tap-highlight-color:rgba(0,0,0,0);
|
298
|
-
}
|
299
339
|
|
300
|
-
.subtext {
|
301
|
-
width:300px;
|
302
|
-
padding:5px 20px;
|
303
|
-
|
340
|
+
```
|