Hey guys. I have implemented the Facebook Like button on my website.
I wanted to make other buttons that match the same style as the button. I made them the same height as the button, but despite the fact that my button will be displayed one pixel higher or lower than the similar button - it was really obvious and looked bad.
Now I'm relatively new to CSS, and I don't know what best practices are.
Using Firebug, I tracked and found out that FBML (however it works) creates a range that contains a similar button. I suggested that this has something to do with the problem.
My solution was as follows:
<div style="display: inline; position: relative; top: 1px;"> <img src="images/button.png"> </div> <fb:like layout="button_count" show_faces="false"></fb:like>
I would be very grateful (as far as I know) if someone could explain why the FB button showed this behavior, and if I fixed it, is this the best resolution?
Just as generic aside ... I ended up getting my page displaying what I want. For this, I used 25 <div> s. It was a lot, although my page is somewhat complicated. This is normal?
Thanks a lot!
EDIT My div is used to position elements. For example, I want some content to appear on the left, and some on the right, so I have two divs with a width of 50% side by side.
Then I want the button to look centered, so I have a div with text-align: center; I did this because I was informed that it is preferable
After that, again I want things left and right, so again I get the same class as the first output of the output. This is complemented, I want a border around the content. So I have another div inside which there is a border: 1px solid black;
Is this the correct / acceptable use? thanks