CSS 3 slide-in from left transition

You can use CSS3 transitions or maybe CSS3 animations to slide in an element. For browser support: http://caniuse.com/ I made two quick examples just to show you how I mean. CSS transition (on hover) Demo One Relevant Code In this case, Im just transitioning the position from left: -100px; to 0; with a 1s. duration. It’s also possible to move … Read more

Style disabled button with CSS

For the disabled buttons you can use the :disabled pseudo class. It works for all the elements that have a disabled API (typically form elements). For browsers/devices supporting CSS2 only, you can use the [disabled] selector. As with the image, don’t put an image in the button. Use CSS background-image with background-position and background-repeat. That way, the image dragging will not occur. Selection problem: here is a … Read more

CSS text-align not working

Change the rule on your <a> element from: to Just add two new rules (width:100%; and text-align:center;). You need to make the anchor expand to take up the full width of the list item and then text-align center it. jsFiddle example

Make a div fill the height of the remaining screen space

2015 update: the flexbox approach There are two other answers briefly mentioning flexbox; however, that was more than two years ago, and they don’t provide any examples. The specification for flexbox has definitely settled now. Note: Though CSS Flexible Boxes Layout specification is at the Candidate Recommendation stage, not all browsers have implemented it. WebKit implementation … Read more

Styling an input type=”file” button

Styling file inputs are notoriously difficult, as most browsers will not change the appearance from either CSS or javascript. Even the size of the input will not respond to the likes of: Instead, you will need to use the size attribute: For any styling more sophisticated than that (e.g. changing the look of the browse … Read more