-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwidth.html
More file actions
56 lines (56 loc) · 1.78 KB
/
width.html
File metadata and controls
56 lines (56 loc) · 1.78 KB
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
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="./style.css">
<title>Iron Style</title>
</head>
<body>
<div id=heading>
<h1><a href="index.html">The Iron Style Generator</a></h1>
<img src="./watson.jpg">
<div id=navigation>
<list>
<li><a href="background.html">Background Color</a></li>
<li><a href="color.html">Text Color</a></li>
<li><a href="width.html">Page Width</a></li>
<li><a href="line.html">Line Height</a></li>
<li><a href="size.html">Font Size</a></li>
<li><a href="radius.html">Border Radius</a></li>
<li><a href="shadow.html">Box Shadow</a></li>
</list>
</div>
</div>
<div id=wrapper>
<div id=content>
<h2>Page Width Picker</h2>
<p>Set the <code>width</code> property on the <code>body</code> element with the selector below.</p>
<form>
<label>Page Width</label>
<select>
<option value="60%">60%</option>
<option value="80%" selected>80%</option>
<option value="100%">100%</option>
</select>
</form>
</div>
</div>
<div id=sidebar>
<h3>Aside goes here</h3>
<p>Also, a link to the <a href="generated_stylesheet.html">stylesheet you generated.</a></p>
</div>
</div>
<div id=footer>Footer</div>
<script src="./app.js"></script>
<script>
var select = document.querySelector("select");
if(sessionStorage["width"]){
setSelect(select, "width")
}
select.addEventListener("change", function(){
var sides = document.querySelector("body");
sides.style.width= select.value;
sessionStorage.setItem("width", select.value);
});
</script>
</body>
</html>