Table is not styling correctly when name is long
I'm having an issue with styling a table on my site. check out my site and if you search for "Rochester, mn", scroll down and you can see that if the name is long, as in the case for Tilson's Au开发者_开发知识库tomotive and Goodyear, it falls below the image. I would rather have the text wrap than have the entire thing drop below the image. Anybody know how I can fix this? It's occuring on Chrome and Firefox.
Set the max-width on the <a>
tag that is the mechanic's name to be the widest it can be (around 175px).
You can fix it by removing the float:left
in the following places:
#results table tbody tr td div
#results table tbody tr td:first-child span
#results table tbody tr td a
#results table tbody tr td div.mechanicDiv
To move the span
to its own line, you could add display:block
.
#results table tbody tr td div.mechanicDiv {
float: left;
margin-left: 10px;
width: 184px;
}
184px was the max width i found.
精彩评论