How i put css on message of Hibernate validator anotation message of spring project
Tags: java,css,spring,twitter-bootstrap,hibernate-validator
Problem :
In my model class have the code using anottation of hibernate validator:
@Size(min = 2, message = "Mínimo 2 caracteres")
private String nome;
@Size(min = 5, message = "Mínimo 5 caracteres")
private String descricao;
In my jsp page the message below my input, but I wanted to put this message bootstrap class. how do I handle this message anottation in the css? thank you,
Solution :
You can attach a CSS class to the Spring tag that is actually displaying a the error like this:
<sf:errors path="nome" cssClass="errortext" />
Then define .errortext
in your CSS file and set your styling from there.
CSS Howto..
Add display: table-cell and vertical-align:middle to your element_menu class and remove the float:left code snippet here... #menu { width: 1000px; height: 55px; border: 1px solid green; background-color: green; } .element_menu...
You can use it like this ("#yourId").css({ -moz-user-select: none; -khtml-user-select: none; -webkit-user-select: none; user-select: none; }); It is better to use class though Your css class: .unselectable{ -moz-user-select: none; -khtml-user-select:...
Specific rules override general rules in CSS. Basic example below. body { direction: ltr; font-size:62.5%; color:#555; font-family:Tahoma, Arial, Helvetica, Verdana, Sans-Serif; z-index:1; } a { font-size:42.5%; } Update HTML: <div...
You should separate with a comma, like this: .my_div:hover, .my_td:hover { border: 1px solid red; } ...
http://monc.se/kitchen/38/cascading-order-and-inheritance-in-css .post pre{ font-size: 12px !important; } Should work, but to answer your questing we need to view all html + css because it really depends......
You can use linear-gradient background. Here is your reusable widget. Cheers! img { display: block; width: 100%; } .img-widget { width: 250px; height: auto; position: relative; } .img-widget .overlay {...
All scrollbar can be different according to browser and OS so you must use javascript. I found a cool snippet here : http://davidwalsh.name/detect-scrollbar-width And that an exemple : http://jsfiddle.net/a1m6an3u/ The...
I haven't come across this before, but I thought about it for a second and it seems like $css['default'] or $css['selector'] makes the most logical sense to me if I...
#xyz iframe { } Whereas this: #xyz.iframe { } would refer to something like <div id="xyz" class="iframe" />...
You need to add the following CSS: .dropdown:hover .dropdown-menu { display: block; } This will set .dropdown-menu to display: block; when .dropdown is hovered. .dropdown { position: relative; } .dropdown:hover...
You can you the Adjacent sibling selectors from the span point of view and change the image display and float rules. div span + img { display: block; float: left;...
a { clear: both; } b { float: left; } c { float: right; } d, e { clear: left; } Would probably solve it (not tested)....
background-image ovverides backgorund. To make it properly work, there also need to be separatelly specified background-repeat. Tested in FF body{ background-color: #fcfcf0; background-repeat:repeat-x; background-image: url(../img/abdul.jpg), -moz-linear-gradient(top, #fff, #A9A9A9); /* And...
I hope you'll find this answer to be both simple and pixel-perfect. .stripe { background-color: #B7B7B7; height: 13vh; } .whiteThing { background-color: white; height: 13vh; width: 13vh; border-radius:0 50% 50%...
You need to apply overflow:hidden to your ul so that your floats are cleared and are contained within the ul. Currently your ul is collapsing since it contains only floated...
This should do it: input.myBox { border: 0px solid #000000; border-bottom-width: 1px; background-color: transparent; } Tested in IE8 (IE7 compatability mode)...
You can give your .movdb-header fixed position and give top: 110px position to your navbar. It is set on top: 0 now. EDIT: .navbar { position: relative; } $(document).ready(function(){ $(window).scroll(function(){...
You can try with this Demo html #test{ width: 50px; height: 600px; background: green; position: absolute; top:0; left:0; right:0; margin: auto; display: inline-block; -webkit-transform: translate(300px) rotate(90deg) ; -webkit-transform-origin: left top;...
you are mixing javascript and jquery here. The add class function will only work with a jquery element. You should be doing someting like $(image2).addClass("page page-2");...
NOTE See ThirtyDot's answer, as it does not impact the outer element's width: How to make div width almost 100% The below will actually make the outer element's width total...
h2 is a default block level element, you are using display: inline-block; and hence it won't center your text, as it doesn't take up entire horizontal space anymore, so you...
Giving the span "#the_requested" a specific width will cause overflow to go to a new line. For example #the_requested { background: purple; width: 168px; } Example: http://codepen.io/anon/pen/zIhca Obviously you would...
Separate out the colours into different CSS classes like so: div.base-text { position: absolute; bottom: 9px; font-size: 10px; font-weight: bolder; text-align: center; width: 61px; text-transform: uppercase; } div.gold { color:...
The inch in css is a logical inch and not physical since most browsers cannot determine the physical size of the screen. By default this is set to 96dpi ,...
Try adding the CSS rule: .entry-content { overflow: visible; } Currently the property is being set to hidden which, as the name suggests, hides all content that extends outside of...
was this what you were aiming for? http://jsfiddle.net/rKaPN/28/
With the given markup, javascript would not be even necessary for links inside #myDropdown: you could just use :focus pseudoclass like so #myDropdown a:focus + div { display: block; }...
You need a higher z-index for the hamb. Remember z-index works just for positioned elements, you need to change the default static position of the button. .overlay { position: fixed;...
In case you are ok with a solution that also involve javascript you can use this: function updateImageHeight() { textHeight = $('.wrapper').height() - $('.wrapper img.img').height() imgMaxHeight = $('.container').height() - textHeight...
Try specifying width for the div of the inputbox