# CSS help

**URL:** https://boards.straightdope.com/t/css-help/636769
**Category:** Factual Questions
**Created:** [October 5, 2012, 2:20am UTC](https://boards.straightdope.com/t/css-help/636769 "2012-10-05T02:20:18Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![CheeseDonkey](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@CheeseDonkey](https://boards.straightdope.com/u/CheeseDonkey)
#### Post date: [October 5, 2012, 2:20am UTC](https://boards.straightdope.com/t/css-help/636769/1 "2012-10-05T02:20:18Z")

</div>

Help! Help!

Click this image:

[![](http://tinypic.com/images/goodbye.jpg) ](http://tinypic.com/images/goodbye.jpg)

On Google Chrome, I want my link to look like #1, but it looks like #2 instead ☹ It looks like #1 on FireFox and Opera, just not Chrome.

This is the code I used:

a.b {  
float:center;  
font-size:13px;  
text-decoration:none;  
color:white;  
background-color:red;  
padding:0.2em 0.6em;  
border:1px solid white;  
}

\<a href=“premium.html” class=“b”\> FA Premium\</a\>

What should I fix to make it work on Chrome, too?

---

<div class="post-metadata">

### Author: ![Gibbs89](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/gibbs89/32/3351_2.png) [@Gibbs89](https://boards.straightdope.com/u/Gibbs89)
#### Post date: [October 5, 2012, 4:02am UTC](https://boards.straightdope.com/t/css-help/636769/2 "2012-10-05T04:02:54Z")

</div>

I tested your code in Chrome on both Windows and Mac. The link looks fine to me in both (like #1 that is).

I’ve never heard of a float:center property though. Perhaps that’s causing you some problems?

---

<div class="post-metadata">

### Author: ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)
#### Post date: [October 5, 2012, 4:24am UTC](https://boards.straightdope.com/t/css-help/636769/3 "2012-10-05T04:24:01Z")

</div>

> [@CheeseDonkey](#):
>
> \<a href=“premium.html” class=“b”\> FA Premium\</a\>

Substituting  
FA&nbsp;Premium  
might bypass the problem. I realize that doesn’t explain the behavior.

---

<div class="post-metadata">

### Author: ![GuanoLad](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/guanolad/32/42_2.png) [@GuanoLad](https://boards.straightdope.com/u/GuanoLad)
#### Post date: [October 5, 2012, 4:35am UTC](https://boards.straightdope.com/t/css-help/636769/4 "2012-10-05T04:35:43Z")

</div>

It’s just breaking at the space, possibly due to the width of the container it’s within. You can use a non-breaking space, as **septimus** suggests, or you can force it to stay in one line by adding “white-space:nowrap;”

---

<div class="post-metadata">

### Author: ![CheeseDonkey](https://avatars.discourse-cdn.com/v4/letter/c/ecae2f/32.png) [@CheeseDonkey](https://boards.straightdope.com/u/CheeseDonkey)
#### Post date: [October 5, 2012, 3:16pm UTC](https://boards.straightdope.com/t/css-help/636769/5 "2012-10-05T15:16:37Z")

</div>

You guys are awesome. Thanks!
