Project

General

Profile

« Previous | Next » 

Revision ef955de6

Added by NOYB NOYB over 9 years ago

HTML Compliance - Picture Widget

In HTML 4.01, the width and height could be defined in pixels or in % of the containing element. In HTML5, the value must be in pixels. Use css for specifying in %.
The for attribute of the label element must refer to a non-hidden form control. Add id attribute.

View differences:

src/usr/local/www/widgets/widgets/picture.widget.php
71 71

  
72 72
?>
73 73
<a href="/widgets/widgets/picture.widget.php?getpic=true" target="_blank">
74
	<img width="100%" height="100%" src="/widgets/widgets/picture.widget.php?getpic=true" alt="picture" />
74
	<img style="width:100%; height:100%" src="/widgets/widgets/picture.widget.php?getpic=true" alt="picture" />
75 75
</a>
76 76

  
77 77
<!-- close the body we're wrapped in and add a configuration-panel -->
......
79 79

  
80 80
<form action="/widgets/widgets/picture.widget.php" method="post" enctype="multipart/form-data" class="form-inline">
81 81
	<label for="pictfile">New picture: </label>
82
	<input name="pictfile" type="file" class="form-control" />
82
	<input id="pictfile" name="pictfile" type="file" class="form-control" />
83 83
	<button type="submit" class="btn btn-default">Upload</button>
84 84
</form>

Also available in: Unified diff