469,275 Members | 1,601 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,275 developers. It's quick & easy.

Why does float:right cause a line break ?

Why does float:right cause a line break? Try the code below. Is there a
fix? I want the link on the same line as the text. Thanks
<html>
<head>
<STYLE>
span.linkpos { float:right; clear: none; color:blue; }
</style>
</head>

<table border 1px >
<tr>
<td>
Source for configuration management documents and drawings from many
projects. These are primarily engineering design documents. Each
Directorate must be searched separately...
<span class=linkpos>
<a href=details. php?id=3&Type_view= detail&Type_Submit=&key_word= >see
details</a>
</span>
</td>
</tr>
</table>
<html>
Jul 21 '05 #1
9 17218
leegold wrote:
Why does float:right cause a line break?


It (in effect) gives whatever you apply it to display:block. Elements with
display:block have line breaks before them.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #2
Hi,

leegold wrote:
Why does float:right cause a line break? Try the code below. Is there a
fix? I want the link on the same line as the text. Thanks

You have to write it this way:

<td>
<span class=linkpos>
<a href=details. php?id=3&Type_view= detail&Type_Submit=&key_word= see
details</a>
</span>
Source for configuration management documents and drawings from many
projects. These are primarily engineering design documents. Each
Directorate must be searched separately...
</td>

The float has to be before the static element, otherwise your browser
does not recognize where to float...

Chris
Jul 21 '05 #3
Chris Leipold wrote on 08 mrt 2005 in
comp.infosystems.www.authoring.stylesheets:
leegold wrote:
Why does float:right cause a line break? Try the code below. Is there a
fix? I want the link on the same line as the text. Thanks

You have to write it this way:

<td>
<span class=linkpos>
<a href=details. php?id=3&Type_view= detail&Type_Submit=&key_word= see
details</a>
</span>
Source for configuration management documents and drawings from many
projects. These are primarily engineering design documents. Each
Directorate must be searched separately...
</td>

The float has to be before the static element, otherwise your browser
does not recognize where to float...


Floating an inline element like <span> is illogical,
therefore browsers seem to change it to a block element.

Better use a <div>.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 21 '05 #4
On Mon, 07 Mar 2005 22:37:09 -0500 leegold wrote:
Why does float:right cause a line break? Try the code below. Is there a
fix? I want the link on the same line as the text. Thanks
<html>
<head>
<STYLE>
.......span.linkpos { float:right; clear: none; color:blue; }

.................................................. .....^^^^^^^^^

not needed here.
you're saying float the item right then immediately clear it which has the
effect of cancelling the float.

<table border 1px >

Wrong syntax.
border says either show or hide the borders. Value of 1 shows, all others
hide.

Should be <table style="border:solid 1px blue;">

Scrap the table.
<div>........text.......<span><a>...lnk text...</a></span</div>

Jul 21 '05 #5
Richard wrote:
On Mon, 07 Mar 2005 22:37:09 -0500 leegold wrote:
.......span.linkpos { float:right; clear: none; color:blue; }


not needed here.
you're saying float the item right then immediately clear it which has the
effect of cancelling the float.


You obviously don't understand either the float or clear properties.

It boggles my mind how you can continually spew forth crap like this
without batting an eye. Have you ever bothered to read the specs to see
if any of your assumptions are even remotely valid? Don't bother
answering because it's quite obvious you haven't.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #6

kchayka wrote:
snip...
It boggles my mind how you can continually spew forth crap like this
without batting an eye. Have you ever bothered to read the specs to see if any of your assumptions are even remotely valid? Don't bother
answering because it's quite obvious you haven't.


kchayka or what ever you weird name is,
I can bet on one thing for sure: you live alone and have very few
friends!
Now go away Troll to your little room!

Jul 21 '05 #7
go******@worldpost.com wrote:

Now go away Troll to your little room!


You must be new around here. ;)

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #8
I'm new and confused.

I am sorry and apologize for the verbage - the troll stuff - I thought
you were directing your questioning at me - then I read the thread
again and saw a poster was saying some absolutely crazy obviously
made-up stuff and you were just responding to him/her.

kchayka,
I am sorry again.

Goldtech

Jul 21 '05 #9
go******@worldpost.com wrote:

I am sorry and apologize for the verbage - the troll stuff - I thought
you were directing your questioning at me
That's why it's important to retain the attribution ("somebody wrote:")
when you reply. FYI, google groups does not automatically quote replies,
so these are dropped from your posts. You should either stop using
google groups to post to usenet, or change the options so it
automatically quotes when you reply.
kchayka,
I am sorry again.


Thanks for that, but I didn't take it personally. I usually wear my
flame-retardant teflon suit around here. ;)

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jul 21 '05 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by jon slinn | last post: by
reply views Thread by PJ | last post: by
1 post views Thread by toylet | last post: by
3 posts views Thread by Günther Stößl | last post: by
10 posts views Thread by Jesper Rønn-Jensen | last post: by
3 posts views Thread by Michael Shell | last post: by
1 post views Thread by vishal | last post: by
5 posts views Thread by Oliver Block | last post: by
22 posts views Thread by ashkaan57 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.