473,549 Members | 2,825 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_v iew= detail&Type_Sub mit=&key_word= >see
details</a>
</span>
</td>
</tr>
</table>
<html>
Jul 21 '05 #1
9 17941
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_v iew= detail&Type_Sub mit=&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.infosystem s.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_v iew= detail&Type_Sub mit=&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.li nkpos { 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:s olid 1px blue;">

Scrap the table.
<div>........te xt.......<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.l inkpos { 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******@worldp ost.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******@worldp ost.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
2376
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 other? the site is : http://www.rockshore.net/html/hol2.html div.lh-col{ width: 18%; float:left; border: solid #333333;
0
1777
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 <input> elements float outside of the table. What is the proper styling for my desired effect? TIA~ PJ
1
3951
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 from doing htat? Could I specify a right margin to the float so that IE6 wouldn't do that? -- .~. Might, Courage, Vision. In Linux We Trust.
3
6602
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 style="float:right; width:30%></div> </div></td>
10
10270
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 paragraph is showed correctly</p> <table style="width:300px"> <tr><td>This table is not moved downwards in Firefox. </td></tr> <tr><td>IE gets it...
3
19402
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 floated span 2 to be on the same line as span 1, but instead it is on the same line as span 3, which is on the line below span 1. Eric Meyer's CSS...
1
2172
by: vishal | last post by:
What does #line 182 parser.y mean in a C program?
5
4908
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 appear inside the surrounding div. There is
22
51440
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 next line. What am I doing wrong? TIA.
0
7551
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7477
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7750
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7509
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7838
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6084
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3524
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3503
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
790
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.