473,748 Members | 4,030 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

URGENT HELP: Text wrapping inside DIV.

Here is my HTML:
<style>
..leftcolumn{fl oat:left;width: 300px;border: 1px solid #ccc}
..rtcolumn{floa t:left;width:60 0px;border: 1px solid #ccc}
</style>

<body>
<div class="leftcolu mn" id="d_links">
multiple <a href="hello.asp x?q=something"> something</a><a
href="hello.asp x?q=something1" >something1</a><a
href="hello.asp x?q=something2" >something2</a><a
href="hello.asp x?q=something3" >something3</a><a
href="hello.asp x?q=something4" >something4</a><a
href="hello.asp x?q=something5" >something5</a>........
</div>
<div id="d_content" class="rtcolumn ">
long text here........... ............... ............... ...........

</div>
</body>

Issue:
The div with id "d_content" rendered is perfect the problem is with div
with id "d_links". The links(text) inside should wrap within the div
tags width but instead that is generated in one long line expanding the
DIV tag. Irrespective what width I assign to d_links it is rendered in
one line and pushes the d_content to next line in IE, whereas in FF
d_links goes under d_contents.

What is going on here? Any help will be greatly appreciated.

Thanks.

PS: I do not have this in public domain to show what is happening.

Mar 7 '06 #1
7 7253
ze****@gmail.co m wrote:

<div class="leftcolu mn" id="d_links">
multiple <a href="hello.asp x?q=something"> something</a><a
href="hello.asp x?q=something1" >something1</a><a
href="hello.asp x?q=something5" >something5</a>........
</div>
<div id="d_content" class="rtcolumn ">
long text here........... ............... ............... ...........
</div>

Issue:
The div with id "d_content" rendered is perfect the problem is with div
with id "d_links". The links(text) inside should wrap within the div
tags width but instead that is generated in one long line expanding the
DIV tag. Irrespective what width I assign to d_links it is rendered in
one line and pushes the d_content to next line in IE, whereas in FF
d_links goes under d_contents.

What does "perfect" mean to you? I have can think of 3 possibilities
right away.
The content of d_links is a solid line of text without whitespace. Where
is there to break?
You could add a <br> explicitly between each link. Or put each link in a
<p>.
Normally though, a list, <ul>, is used to layout a list of items. See
<http://css.maxdesign.c om.au/listamatic/>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 7 '06 #2
My bad there is &nbsp; between each like below:

<div class="leftcolu mn" id="d_links">
multiple <a href="hello.asp x?q=something"> something</a>&nbsp;<a
href="hello.asp x?q=something1" >something1</a>&nbsp;<a
href="hello.asp x?q=something2" >something2</a>&nbsp;<a
href="hello.asp x?q=something3" >something3</a>&nbsp;<a
href="hello.asp x?q=something4" >something4</a>&nbsp;<a
href="hello.asp x?q=something5" >something5</a>........
</div>

And the way I want it to be display is like this:
something something1
something2
something3 ....

depending upon the length of the inner text of anchor number of links
are fitted on one line.

When I said perfect, I meant, rendered the way I want it to. Items
inside are rendered without any flowing out or clipping unnecessarily.

I had considered using list but I have seen some site that could do it
without list tag.

Thanks.

Mar 7 '06 #3
On 6 Mar 2006 21:36:51 -0800, ze****@gmail.co m wrote:
My bad there is &nbsp; between each like below:

<div class="leftcolu mn" id="d_links">
multiple <a href="hello.asp x?q=something"> something</a>&nbsp;<a
href="hello.as px?q=something1 ">something 1</a>&nbsp;<a
href="hello.as px?q=something2 ">something 2</a>&nbsp;<a
href="hello.as px?q=something3 ">something 3</a>&nbsp;<a
href="hello.as px?q=something4 ">something 4</a>&nbsp;<a
href="hello.as px?q=something5 ">something 5</a>........
</div>

And the way I want it to be display is like this:
something something1
something2
something3 ....


Huh? You mean you are putting NON-BREAKING spaces in and then wondering
why there are no line-breaks? Isn't the answer rather obvious?

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Mar 7 '06 #4
zeyais wrote:
My bad there is &nbsp;


NBSP = Non-Breaking SPace.

There is nowhere to wrap the text.

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Mar 7 '06 #5
Stephen Poley <sb************ ******@xs4all.n l> wrote:
Huh? You mean you are putting NON-BREAKING spaces in and then
wondering why there are no line-breaks? Isn't the answer rather
obvious?


The original poster forgot quite a many elementary principles of
posting to Usenet and specifically to c.i.w.h. groups. _Especially when
you need urgent help_,
- do not multipost
- don't even think of that!
- DO NOT SHOUT, IT HURTS PEOPLE'S EYES AND MAKES YOU LOOK UNFRIENDLY
- do not waste space in the Subject line to tell you need urgent help
- post the URL instead of wasting time in explaining why you are not
doing that
- use your real name, it always improves the impression that you
are serious and constructive.

See my response in c.i.w.a.stylesh eets. The really urgent need is to
redesign the page, so that the problem is not created in the first
place.

Using just spaces between links, though common and not the worst of
mortal sins, is not good practice. Using e.g.
<a ...>...</a>&nbsp;| <a ...>...
is better: it puts visible (and audible) separators between the links
(and the &nbsp; prevents the separator from appearing at the start of a
line).

More logically, a list of links is written as a <ul> element, then (if
desired) styled with CSS so that it is rendered effectively as running
text, but there are considerable technical problems with this at
present (especially as regards to producing some visible separators).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Mar 7 '06 #6
ze****@gmail.co m wrote:
PS: I do not have this in public domain to show what is happening.


Then we do not have access to your private space to help you.

You've already posted one fragment that was critically inaccurate
(missing &nbsp;) and wasted everyone's efforts, compared to ust posting
a URL. Why should anyone bother to help someone who is deliberately
making things difficult for them?

Mar 7 '06 #7
ze****@gmail.co m wrote:

I had considered using list but I have seen some site that could do it
without list tag.

Using a list element, <ul>, for a list of items is semantically correct
and painfully obvious. Who cares that other site's authors do not know how
to use a markup language?

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Mar 7 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1679
by: descds | last post by:
OK im prety much a newbie at PHP but it has me hooked. Im writing a comment system for one of our modules on phpnuke. Its all going very well, well should i say WAS going very well :) Ok all the comments work etc and everything is intergrated nicely in the database. Now im parsing the comments back out to the user and replacing string like :) with emoticons etc. It works perfectly and i'm seriously pleased with myself (ok ok remember i...
7
3265
by: Robert Nicholson | last post by:
So I've got one page where I have an image inside a DIV with text-align: center and the image is correctly centered in that block. Making me think that text-align will center the contents of a block. Another page I have a series of thumbnails which are themselves a DIV block wrapping both an image and a caption (float: left) inside a DIV block with a fixed width which is smaller than the width of the browser and that DIV block is in...
4
1480
by: Joseph | last post by:
The idea is to show only one of the <Baby_Div> while hiding all the others. At the moment all I have managed to do is to show each <Baby_Div> in turn as expected, but the problem is that once a <Baby_Div>.innerHTML is replaced by one of the procedures, it does not work anymore, ie, the <Baby_Div> content is not displayed anymore, once code replaces the actual 'Blah' string. Structure: <Top-Div> <Child_Div (6 in total)> <Baby_Span>
3
1959
by: Francesc | last post by:
Hi, After some years programming libraries and web based applications I'm trying to program my first not-silly windows application (something similar to an editor but just to annotate text lines). After some trials just putting some code directly at the control events I tried to refactorize a little. But after read some documents on CMV (Controller-Model-Viewer) pattern I spent all this week trying unluckily to use it.
0
1122
by: PeteZ | last post by:
Inside HTML <TD> cells, I used to place <image src= . . . > statements with the align="right" or "left" option then place the text inside the same TD area. This would then allow browsers to auto wrap the text around the image and worked just great. How can this be achieved with the ASP.Net AdRotator control ? (it doesnt support a align property and have tried a few things but cant seem to get it to allow text wrapping around the...
3
6471
by: N. Spiker | last post by:
I am attempting to receive a single TCP packet with some text ending with carriage return and line feed characters. When the text is send and the packet has the urgent flag set, the text read from the socket is missing the last character (line feed). When the same text is sent without the urgent flag set, all of the characters are read. I'm reading the data using the blocking read call of the network stream class. The .NET...
3
8185
by: zjw2112 | last post by:
Hello. I have some javascript code that dynamically creates a textarea and sets the wrap value to hard, which I thought would preserve CR/LF in the textarea: var otherTextArea = document.createElement("textarea"); otherTextArea.setAttribute("rows", "10"); otherTextArea.setAttribute("cols", "30"); otherTextArea.setAttribute("id", "otherTextArea"); otherTextArea.setAttribute("wrap", "hard");
13
3321
by: Stevo | last post by:
I've found that for IE6+, if you add the property text-align:center to a DIV, then *anything* inside it gets centered. That can be a table, an object/embed, another DIV, an image, or some text. Firefox and Safari on the other hand don't treat text-align in that way. In my tests on those browsers, they only centers images and text. Any DIVs, object/embeds or tables remain default unaligned and generally appear on the left. Considering...
8
2248
by: manugm1987 | last post by:
<?xml-stylesheet type="text/xsl" href="ch1.xsl"?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <style type="text/css"> span.cls_002{ font-family:Arial,serif;font-size:22px;color:rgb(51,51,51);font-weight:bold;font-style:normal} div.cls_002{font-family:Arial,serif;font-size:22px;color:rgb(51,51,51);font-weight:bold;font-style:normal}...
0
8831
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9548
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9325
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
8244
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6796
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6076
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4607
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
2787
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2215
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.