Bear Bibeault wrote:Is the item you are floating first?
Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Rob Crowther wrote:You've set the item you want to centre as float: left, it shouldn't be too surprising to you that it's not centred?
Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Rob Crowther wrote:Is this what you're trying to do?
I had to replace your icon in the fiddle, so I picked one at random from this page. I also simplified your markup - couldn't see the point of having the <a> elements that didn't link anywhere, and the extra wrapper elements were serving no purpose either. Could be in the full version of your code they have a purpose, but in the code you posted they're just getting in your way. Also ridiculously long IDs are one of my pet hates, and you should avoid using them just as CSS hooks. Your class names also make the mistake of describing the style rather than the semantics - what are you going to do when a future revision means that your redItalicSmallBold class has to have large, blue underlined text?
Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Rob Crowther wrote:No, it doesn't.
Read my books: Hello! HTML5 & CSS3 | HTML5 in Action | Read my blog
Rob Crowther wrote:I'm not sure how that would help, it's your code which needs fixing? I've posted working code based on the code you provided, how is your code different to that?
Also, you don't need to quote my entire comment every time, we can all see what I said already without you repeating it.
Rob Crowther wrote:No, it doesn't.
Bear Bibeault wrote:Something doesn't work in IE8? What a shock!
Repeat: try putting the floated element first.
[Can't test it myself -- all my Windows virtual machines are at the office.]
today's feeble attempt to support the empire
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|