Skip to content

Commit b11bae3

Browse files
author
Cedric Dugas
committed
added demo positioning, fixed pull request for chrome
1 parent 69e7503 commit b11bae3

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

css/template.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ form.formular {
1010
width: 300px;
1111
margin: 0 auto;
1212
}
13-
1413
.formular fieldset {
1514
margin-top: 20px;
1615
padding: 15px;
@@ -26,6 +25,7 @@ form.formular {
2625
.formular fieldset label {
2726
float: none;
2827
text-align: inherit;
28+
display:block;
2929
width: auto;
3030
}
3131

demos/demoPositioning.html

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,9 @@
9595
</legend>
9696
<label>
9797
<div>Field is required : </div>
98-
<input value="" class="validate[required] text-input" type="text" name="req" id="req" />
98+
9999
</label>
100+
<input value="" class="validate[required] text-input" type="text" name="req" id="req" />
100101
<label>
101102

102103
<div>Favorite sport 1:</div>
@@ -131,8 +132,10 @@
131132
<input class="validate[required] radio" type="radio" name="group0" id="radio3" value="9"/></div>
132133
</label>
133134
<label>
134-
<span class="checkbox">I accept terms of use : </span>
135+
<div>
136+
I accept terms of use :
135137
<input class="validate[required] checkbox" type="checkbox" id="agree" name="agree"/>
138+
</div>
136139
</label>
137140
</fieldset>
138141

js/jquery.validationEngine.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1239,7 +1239,12 @@
12391239
// empty relative span does not disturb page layout
12401240
// prompt positioned absolute to relative span
12411241
// vertical-align:top so position calculations are the same as isOverflown
1242-
var outer = $('<span>').css('position','relative').css('vertical-align','top').addClass('formErrorOuter').append(prompt.css('position','absolute'));
1242+
var outer = $('<div>').css({
1243+
'position' :'relative',
1244+
'display' :'inline',
1245+
'overflow' :'auto'
1246+
}).addClass('formErrorOuter').append(prompt.css('position','absolute'));
1247+
12431248
field.before(outer);
12441249
if(options.relativePadding) {
12451250
outer.css('padding-bottom', prompt.height() + 'px');

0 commit comments

Comments
 (0)