Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

float right

Status
Not open for further replies.

dexeloper

Programmer
Oct 26, 2004
162
GB
Any suggestions for why 'Bbbbbb' isn't on the same line as 'Aaaaa' in this:

<html>
<head>
<style type="text/css">
#bar{width:100%;height:30px;color:white;padding-top:5px;background:#888888;}
#baright{float:right;display:inline;}
</style>
<body>
<br/><br/>
<div id="bar">
Aaaaaaaa<span id="baright">Bbbbbbbbbbb</span>
</div>
</body>
</html>
 
Hi

dexeloper said:
Any suggestions for why 'Bbbbbb' isn't on the same line as 'Aaaaa' in this:
Because the un-floated content flows over the preceding floated elements. What you want would work if written like this :
Code:
[b]<div[/b] [maroon]id[/maroon][teal]=[/teal][green][i]"bar"[/i][/green][b]>[/b]
[b]<span[/b] [maroon]id[/maroon][teal]=[/teal][green][i]"baright"[/i][/green][b]>[/b]Bbbbbbbbbbb[b]</span>[/b]Aaaaaaaa
[b]</div>[/b]

Feherke.
 
By George you're right Feherke. I'm learning.

What would you like - some ginger icecream or a cold lager?

Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top