mcan
mcan

Reputation: 2082

CSS Positioning and Floating

my jsFiddle

I want to write

`playing Stephan Malkmus - Out of Reaches radio`

but it become line by line in the fiddle.

How can i wtite it in a single line?

Upvotes: 0

Views: 81

Answers (3)

rpasianotto
rpasianotto

Reputation: 1413

Your html code is semantically incorrect, a div element is a tag that have a block display, so it occupies the space of a row.

For inline element use the span tag which is an inline tag and solve your problem without using css but only the correct use of HTML5 features.

DEMO

Upvotes: 1

Mihai Nistor
Mihai Nistor

Reputation: 11

display:inline-block;

In case you need to add a padding or a margin to the text.

Upvotes: 1

Fabrizio Calderan
Fabrizio Calderan

Reputation: 123438

add

display: inline;

to #channelInfo (since div elements are, by default, block elements)

example: http://jsfiddle.net/c3QYp/

Upvotes: 4

Related Questions