WJ... can I jump in here as I'm learning css. On your fiddle you write in the css... "div#container", why have not just written "#container" and applied that to the div, or does it do something else when written that way?
If you write div#container, the style will only apply to the id container that belongs to a div. So let's say you use <table id="container"> the style wont be applied, because we wrote div#container and therefor made it a div only style.
It's not at all required to do it this way, it's just a habit now and i find it easier ;)
So the blue area is the slider and the green is my images that can have the same or bigger height than the slider. What I want is not showing the top part of the image but the middle.
But I will try that way too, Mottie. I already had read that article but didn't remembered. Thank you.
So my slider have width:100% (so as the images) and overflow:hidden and my question is: how can I center vertically the images?
Thanks in advance.
In this jsfiddle example, i used the
position: absolute, with atop: 50%and amargin-topthat has a negative-(height / 2)pxOn this site (http://blog.themeforest.net/tutorials/vertical-centering-with-css/) is an interesting article about it using several methods.
I hope it is any help for your solution
~ Wouter
thanks in advance
steve
If you write
div#container, the style will only apply to the id container that belongs to a div. So let's say you use<table id="container">the style wont be applied, because we wrotediv#containerand therefor made it a div only style.It's not at all required to do it this way, it's just a habit now and i find it easier ;)
~ Wouter
Here's the example: http://imageshack.us/photo/my-images/526/exampleqf.jpg/
So the blue area is the slider and the green is my images that can have the same or bigger height than the slider. What I want is not showing the top part of the image but the middle.
But I will try that way too, Mottie. I already had read that article but didn't remembered. Thank you.