One of current CSS left outs is vertical align div. And before CSS 3 comes we have to use some tricks to solve this problem. I looked over for some solutions and it all comes up to defining it as table and using vertical align. The second one appears a lot and it’s a nice solution, but it has two faults, I’ll tell you later about them, here’s the code first.
Idea is to place absolute div 50% left and top and then to move margin left and top half if it’s size. Click here for demo
32 comments so far
CSS
Random post
Ever seen on some site whole content area with images etc as just one link? Usually there’s some hover for the background and they are mostly on the sidebars left or right or let’s say on the footer. You can see live example on previous version of my portfolio here - those links on the right. This tutorial will show you how to do that with CSS, and tell you something more about display:block; option.
In this simple example I will go with <li> tag for it, because I think it’s used more, but also you can apply this for <div> tag.
12 comments so far
CSS Design
Random post
You must have seen that annoying Firefox option for changing your fields background color in your beautiful contact, order, comments form. Yes you are right, it’s everywhere mostly for Email, Name and some other form fields. Even if you set background color it will change it, and that’s for focus state too. I have a solution that I’m using for a while, it’s not really elegant one, it requires images, but it works just fine.
27 comments so far
CSS Design
Random post
If you are CSS coder, you’ve probably ran in to png transparency problems many times. Even Microsoft is having problems with it http://runonce.msn.com/runonce2.aspx open in IE6. So I’ll tell you few problems and solutions I’ve handled so far.
First one is if you need just simple transparent image, without some special needs for example backgrounds etc. The solution would be png fix. I’ve used it many times but it has lots of faults, for example with padding, margins and absolute positioning. Sometimes i can mess up the rest of your JavaScript files, but anyway very useful script.
34 comments so far
CSS Javascript
Random post