Connecting Tech Pros Worldwide Help | Site Map

URGENT HELP: line wrap not happening inside Div

zeyais@gmail.com
Guest
 
Posts: n/a
#1: Mar 7 '06
Here is my HTML:
<style>
..leftcolumn{float:left;width:300px;border: 1px solid #ccc}
..rtcolumn{float:left;width:600px;border: 1px solid #ccc}
</style>

<body>
<div class="leftcolumn" id="d_links">
multiple <a href="hello.aspx?q=something">something</a><a
href="hello.aspx?q=something1">something1</a><a
href="hello.aspx?q=something2">something2</a><a
href="hello.aspx?q=something3">something3</a><a
href="hello.aspx?q=something4">something4</a><a
href="hello.aspx?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.

Jukka K. Korpela
Guest
 
Posts: n/a
#2: Mar 7 '06

re: URGENT HELP: line wrap not happening inside Div


zeyais@gmail.com wrote:
[color=blue]
> Here is my HTML:[/color]

Where's your URL?
[color=blue]
> .leftcolumn{float:left;width:300px;border: 1px solid #ccc}[/color]

Bad style. Hang around for a while or check past discussions to learn
why px dimensions are bad.
[color=blue]
> <div class="leftcolumn" id="d_links">
> multiple <a href="hello.aspx?q=something">something</a><a
> href="hello.aspx?q=something1">something1</a><a[/color]

Why don't you give us the URL of the real page, instead of taking great
trouble in dummifying the stuff, thereby removing a most relevant part
of actual data?
[color=blue]
> The links(text) inside should wrap within the div
> tags width but instead that is generated in one long line expanding the
> DIV tag.[/color]

If your dummy "something" stuff does not contain spaces, that's more or
less what happens. You have words with nothing between (disregarding the
<a> markup in this context), and browsers generally do not break words.

Links with nothing between them are a very bad idea. Have you
considered, for example, what it _sounds_ when spoken?

So this is really a "Doctor, it hurts when I do _this_. - Then don't do
that." case.
[color=blue]
> PS: I do not have this in public domain to show what is happening.[/color]

This is a comp.infosystems.www.authoring group. You are supposed to have
a WWW authoring problem or topic if you post here. If the page isn't
ready yet, upload your best effort so far, so that you can specify a URL.
Yucky Korpulent
Guest
 
Posts: n/a
#3: Mar 20 '06

re: URGENT HELP: line wrap not happening inside Div


Your anchors would wrap if you separated each tag with a space, e.g.

<a href=".">blah</a> <a href=".">blah</a> <a href=".">blah</a>

Alternatively you could style the tags as block elements to list
vertically, e.g.

..leftcolumn A {display:block}

Yucky,

Closed Thread


Similar HTML / CSS bytes