473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

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 17911
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jon slinn | last post by:
Does anybody know why I can't get a simple two col design to work using the following css? At the moment my columns seem to be arranging left and right correctly but are stacked on top of each...
0
by: PJ | last post by:
http://www.paulwalker.tv/test.htm I want the Asset List title to float to the left in the cell and the <select> and <input> elements to float to the right. However, in Mac IE, the <select> and...
1
by: toylet | last post by:
Unlike Mozilla, when float:right an item in IE6, it's sort of appending a <br> after the float. You can see the difference here: http://toylet.homeip.net/~toylet Is there a way to stop IE6...
3
by: Günther Stößl | last post by:
Hello I am trying to position two floats inside a table column. <td> <div style="position:relative; width:100%"> <div style="position:absolute; left:0px; width:60%>... </div> <div...
10
by: Jesper Rønn-Jensen | last post by:
Hope you can help me out on this one. I have a a box that is floated right. Below (in the normal float) I have a wide table. <body> <div style="float:right; width:200px">...</div> <p>This...
3
by: Michael Shell | last post by:
Greetings, I've been playing with CSS inline floats of <span> elements and the results are not quite what I would expect. In the example attached at the end of this post, I would expect the...
1
by: vishal | last post by:
What does #line 182 parser.y mean in a C program?
5
by: Oliver Block | last post by:
Hello everybody, I wonder why a <span style="float:right">some text</span> might be displayed out of a surrounding div element. It is shifted to the next line. I thougt it is supposed to...
22
by: ashkaan57 | last post by:
Hi, I am trying to put text on left and right side of the page and used: <div> <span>blah blah</span> <span style="float:right">blah blah</span> </div> The 2nd text does go to the right but the...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.