By default subscript ( ) and superscript ( ) tags are styled with vertical-align: sub, respectively vertical-align: super by most browsers.

While IE9 does support HTML5 tags, it fails to work until you force HTML5 mode. Here are two ways to do that. Option 1: Doctype Make sure your HTML document...

...uses HTML5. It should start like this: Option 2: Magic meta tag If you can not set a doctype, you use the X-UA-Compatible meta tag in your HTML...

These steps are now part of Spreewald. This note describes a Cucumber step that lets you write this:

plnkr.co

...sets flex-basis: 0 which IE fails to support properly. Example Consider the following HTML and CSS. foo bar .container { display: flex; flex-direction: column; } .child { flex: 1; }

Views are normally (for good reason) not rendered in controller specs. If you need it to happen, use:

stackoverflow.com

...a nasty bug which sometimes prevents it from rendering the shadow properly. Consider this HTML: Hello universe While it works in other browsers, IE9 is not showing any shadow. For...

...Although this does the trick, you need to set a zero cellspacing in the HTML (or border-spacing in CSS, if possible) to avoid space between table cells.\

shoelace is a library of web components. Here is a proof of concept how a integration (slightly different as the...

SimpleForm is a great approach to simplifying your forms, and it comes with lots of well-defined input types. However...

...client, it's best practice to put script tags at the bottom of the HTML. This way, the page can start to render before scripts have been loaded and run...

When you regularly make use of Cucumber's "show me the page" step (or let pages pop up as errors...

...encounter problems with timing - For example if your test runs faster than your application, html elements may not yet be visible when the test looks for them. That's why...

github.com

No one wants to cry over regression issues in views; does testing HTML and CSS have to be such a back and forth between designers and devs? Why is it...

RackTest RackTest is a simple browser simulator that is just aware of plain HTML represented as a string (HTTP response body). It does not evaluate CSS or JavaScript. It...

Having a unique selector for an element is useful to later select it from JavaScript or to update a fragment...

...of time in the long run. It will also instantly reload changes to your html views. Simply follow the instructions below, taken from blog.55minutes.com. Install CSS live reload (only once...

New versions of wkhtmltopdf dissallow file:// URLs by default. You can allow them by passing --enable-local-file-access.

If you get an error like this: Unable to launch /home/bruce/Projects/myproject/tmp/capybara/capybara-201110311210111407691101.html ... update your launchy gem. It failed for us in...

This might eventually be fixed by Rails itself.\ Right now this is the way to have the rails_xss plugin...

...iPhone|iPad|Windows Phone|Opera Mobi|Kindle|BackBerry|PlayBook)\b/i end In your layout: %html %body{ :class => 'touch_device' => ('true' if touch_device?)} In your application.js: var TouchDevice = (function() {

You most likely have a form element inside another form element. Don't do that. Ever. Firefox and Chrome will...

jsfiddle.net

Consider this HTML: Click me! Hello Universe! Hello Universe! Hello Universe! Hello Universe! Hello Universe! Hello Universe! If you want the actions element to float on the left, you'd...

Calling #gsub on a string that was previously marked as #html_safe will lead to unexpected behavior. E. g. backreferences to captured groups ($1, $2) will be nil even if...

...group was matched. There is no universal workaround available since you can't expect #html_safe strings to still be safe after using gsub on them. You can, however, fix...

...align a div box inside a div container. This is how you do it: HTML Some text... in two lines. CSS Set the line-height to the container's (implicit...

makandra dev
alan.norbauer.com

...Debug a Function Pause Execution on URL Change Debugging Property Reads Use copy() Debugging HTML/CSS