Marleyzs
Marleyzs

Reputation: 155

How to align text between divs

This is my problem : http://jsfiddle.net/F6pNm/8/

I need the text to appear on same line as the links. But it keeps using adding a empty line at the right.

EDIT: Forgot to mention, I need the text within the div to be centered between the links.

Upvotes: 0

Views: 170

Answers (3)

d-_-b
d-_-b

Reputation: 23211

if you add this:

#footer {text-align:center;}

and add

#flash {display:inline} to the 'flash' id

if will work : http://jsfiddle.net/F6pNm/24/

note: This will also work if you want to center more than one div, just use a class instead of an id (and . instead of #) to apply it to multiple divs

Upvotes: 1

Daedalus
Daedalus

Reputation: 7722

Use display: inline-block for the flash div. Since you mentioned you want the content centered, add #footer { text-align: center; } to your style rules.

Upvotes: 0

Evan Mulawski
Evan Mulawski

Reputation: 55354

Have div#flash float left as well.

Upvotes: 1

Related Questions