View Full Version : Div Aligning Right in Chrome But Not In FF/IE

Feb 22nd, 2015, 10:25 PM
Hi there,

On the page https://www.crushmymarket.com/ in the header you'll see a Click To Call button (not visible on mobile devices). In Chrome, this element is correctly aligned to the right within the widget area. However, in both Firefox and Internet Explorer in appears centered (not sure if it's actually centered or just appearing close to being centered).

Any idea how to fix this so it's aligned right in all browsers?


Feb 22nd, 2015, 10:28 PM
Actually looks like if I add to .click-to-call CSS of width: 100% and float: right that it works as expected. I made that change so I guess this is resolved unless that was an incorrect way of doing it and someone cares to share a "better" way.


Feb 22nd, 2015, 11:14 PM
float:right is what did it. Doesn't matter what the width is.

Feb 23rd, 2015, 04:31 AM
That's what I thought as well but for some reason it doesn't actually float right unless I set the width to 100%. There's likely something funny going on somewhere else. But it works.