Posts

Showing posts with the label Input

CSS/HTML: Create A Glowing Border Around An Input Field

Image
Answer : Here you go: .glowing-border { border: 2px solid #dadada; border-radius: 7px; } .glowing-border:focus { outline: none; border-color: #9ecaed; box-shadow: 0 0 10px #9ecaed; } Live demo: http://jsfiddle.net/simevidas/CXUpm/1/show/ (to view the code for the demo, remove "show/" from the URL) label { display:block; margin:20px; width:420px; overflow:auto; font-family:sans-serif; font-size:20px; color:#444; text-shadow:0 0 2px #ddd; padding:20px 10px 10px 0; } input { float:right; width:200px; border:2px solid #dadada; border-radius:7px; font-size:20px; padding:5px; margin-top:-10px; } input:focus { outline:none; border-color:#9ecaed; box-shadow:0 0 10px #9ecaed; } <label> Aktuelles Passwort: <input type="password"> </label> <label> Neues Passwort: <input type="password"> </label> How about something like this... ht...

CSS Input With Width: 100% Goes Outside Parent's Bound

Image
Answer : According to the CSS basic box model, an element's width and height are applied to its content box. Padding falls outside of that content box and increases the element's overall size. As a result, if you set an element with padding to 100% width, its padding will make it wider than 100% of its containing element. In your context, inputs become wider than their parent. You can change the way the box model treats padding and width. Set the box-sizing CSS property to border-box to prevent padding from affecting an element's width or height: border-box : The width and height properties include the padding and border, but not the margin... Note that padding and border will be inside of the box. Note the browser compatibility of box-sizing (IE8+). At the time of this edit, no prefixes are necessary. Paul Irish and Chris Coyier recommend the "inherited" usage below: html { box-sizing: border-box; } *, *:before, *:after { box-sizing: inherit; } For ref...

Css Gradient Background Button

Answer : Well, they used this in default state: background: #0079FF; background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#0096FF), to(#005DFF)); background: -webkit-linear-gradient(0% 0%, 0% 100%, from(#0096FF), to(#005DFF)); background: -moz-linear-gradient(center top, #0096FF, #005DFF); For hover they have other colors of course. Just change the color for your needs.

Can A Default Path Be Set Globally For \input{...} Akin To \graphicspath{...}?

Answer : \graphicspath comes from LaTeX's \input@path , just using the paths for graphics files. \input@path can be set independently, e.g.: \makeatletter \def\input@path{{path1/}{path2/}} \makeatother Internally package graphics stores its path of \graphicspath in \Ginput@path and locally sets \input@path to \Ginput@path , if it looks for files via \IfFileExists . Addition to \input@path The macro \input@path can be undefined (usually the default in LaTeX) or it can already contain other path entries. Therefore, \providecommand in the following code first defines the macro for the case that \input@path is undefined. Then \g@addto@macro extends the definition of \input@path . \makeatletter \providecommand*{\input@path}{} \g@addto@macro\input@path{{path1/}{path2/}}% append \makeatother Alternatively \edef can be used, which expands the definition text. The next example uses it to prepend the contents to \input@path to the old meaning of \input@path : \m...