This adds a CSS psuedo class to fieldset that acts much in the same way as the one on form.
16 lines
271 B
HTML
16 lines
271 B
HTML
<!DOCTYPE html>
|
|
<!-- fieldset with invalid and valid elements -->
|
|
<html>
|
|
<head>
|
|
<style>
|
|
fieldset:invalid { display: none; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<fieldset>
|
|
<input id='i' value='foo'>
|
|
<input required>
|
|
<fieldset/>
|
|
<body>
|
|
<html>
|