HighDots Forums  

forcing SPAN elements together in a single row

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss forcing SPAN elements together in a single row in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Ted Zlatanov
 
Posts: n/a

Default forcing SPAN elements together in a single row - 10-22-2007 , 11:14 AM






Hello,

my problem is very simple. I have:

<div id="enclosing">
<div id="d1">
<span id="s1">S1</span>
<span id="s2">S2</span>
<span id="s3">S3</span>
</div>
</div>

I'd like these three SPAN elements to always stay in one row, instead of
wrapping to the next line if the "enclosing" DIV is too small. It's OK
to force scrollbars, since the arrangement is more important than
visibility in this particular case.

I can artifically achieve this by setting the "d1" width to 1000% but
that's ugly and I'm sure I'm missing something obvious. I could also
use a table but want a CSS solution if possible.

Thank you very much for any help.

Ted

Reply With Quote
  #2  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-22-2007 , 11:31 AM






Ted Zlatanov wrote:
Quote:
Hello,

my problem is very simple. I have:

div id="enclosing"
div id="d1"
span id="s1">S1</span
span id="s2">S2</span
span id="s3">S3</span
/div
/div

I'd like these three SPAN elements to always stay in one row, instead of
wrapping to the next line if the "enclosing" DIV is too small. It's OK
to force scrollbars, since the arrangement is more important than
visibility in this particular case.

I can artifically achieve this by setting the "d1" width to 1000% but
that's ugly and I'm sure I'm missing something obvious. I could also
use a table but want a CSS solution if possible.
#d1 { white-space: nowrap; }

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #3  
Old   
dorayme
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-22-2007 , 06:21 PM



In article <d4ba7$471cc258$40cba7c2$18606 (AT) NAXS (DOT) COM>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Quote:
Ted Zlatanov wrote:
Hello,

my problem is very simple. I have:

div id="enclosing"
div id="d1"
span id="s1">S1</span
span id="s2">S2</span
span id="s3">S3</span
/div
/div

I'd like these three SPAN elements to always stay in one row, instead of
wrapping to the next line if the "enclosing" DIV is too small. It's OK
to force scrollbars, since the arrangement is more important than
visibility in this particular case.

I can artifically achieve this by setting the "d1" width to 1000% but
that's ugly and I'm sure I'm missing something obvious. I could also
use a table but want a CSS solution if possible.

How would a table help this problem?



Quote:
#d1 { white-space: nowrap; }
--
dorayme


Reply With Quote
  #4  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-22-2007 , 10:11 PM



dorayme wrote:
Quote:
In article <d4ba7$471cc258$40cba7c2$18606 (AT) NAXS (DOT) COM>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Ted Zlatanov wrote:
Hello,

my problem is very simple. I have:

div id="enclosing"
div id="d1"
span id="s1">S1</span
span id="s2">S2</span
span id="s3">S3</span
/div
/div

I'd like these three SPAN elements to always stay in one row, instead of
wrapping to the next line if the "enclosing" DIV is too small. It's OK
to force scrollbars, since the arrangement is more important than
visibility in this particular case.

I can artifically achieve this by setting the "d1" width to 1000% but
that's ugly and I'm sure I'm missing something obvious. I could also
use a table but want a CSS solution if possible.

How would a table help this problem?
Simple, it wouldn't.

Quote:
#d1 { white-space: nowrap; }
This will however.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #5  
Old   
dorayme
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-22-2007 , 10:25 PM



In article <7dc8$471d584b$40cba7c2$3525 (AT) NAXS (DOT) COM>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Quote:
I can artifically achieve this by setting the "d1" width to 1000% but
that's ugly and I'm sure I'm missing something obvious. I could also
use a table but want a CSS solution if possible.

How would a table help this problem?

Simple, it wouldn't.


#d1 { white-space: nowrap; }

This will however.
It sure will. I was convinced the first time I read it.

(In fact, JL, you convince me so much about so many things that I
reckon you could wangle money out of me with any lowdown scheme.
This is the basis of a lot of con tricks. You gain the trust of
the victim and then pow... like in "Tin Men" where the aluminium
cladding salesman would drop a $5 on the carpet of his victim's
house and then pretend to find it and "Oh, look, you must have
dropped this" says he to show what an honest fellow he is... the
sale is practically his then... <g>)

--
dorayme


Reply With Quote
  #6  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-22-2007 , 10:52 PM



dorayme wrote:

Quote:
(In fact, JL, you convince me so much about so many things that I
reckon you could wangle money out of me with any lowdown scheme.
This is the basis of a lot of con tricks. You gain the trust of
the victim and then pow... like in "Tin Men" where the aluminium
cladding salesman would drop a $5 on the carpet of his victim's
house and then pretend to find it and "Oh, look, you must have
dropped this" says he to show what an honest fellow he is... the
sale is practically his then... <g>)

Hey, I saw that one! It was good. Many of yours with Bud-man or whatever
I have not watched. Been watching anime lately, best one lately was
"Tekken Kinkreet". Absolutely fantastic...the style and the detail.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #7  
Old   
dorayme
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-22-2007 , 11:18 PM



In article <4736b$471d61cf$40cba7c2$5520 (AT) NAXS (DOT) COM>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Quote:
Hey, I saw that one! It was good. Many of yours with Bud-man or whatever
I have not watched.
Officer Bud White? Ah, there are only very few films that are any
good with him in them.

La Confidential
Master and Commander (a rollicking good tale)
Gladiator
The Sum of Us
Proof

(the rest... bah! The one I really like is the one in my head: he
goes, on my explicit orders, to whatever bunker Boji hides in,
hauls his sad ass out and beats the living daylights out of him
every time he makes low remarks about women or his own pants...)

--
dorayme


Reply With Quote
  #8  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-22-2007 , 11:52 PM



dorayme wrote:
Quote:
In article <4736b$471d61cf$40cba7c2$5520 (AT) NAXS (DOT) COM>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Hey, I saw that one! It was good. Many of yours with Bud-man or whatever
I have not watched.

Officer Bud White? Ah, there are only very few films that are any
good with him in them.

La Confidential
Master and Commander (a rollicking good tale)
Gladiator
The Sum of Us
Proof
Not seen any of those. Is this Crowe? I saw him in A Beautiful
Mind...okay but I was underwhelmed.

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #9  
Old   
dorayme
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-23-2007 , 12:40 AM



In article <8999d$471d6ffd$40cba7c2$8838 (AT) NAXS (DOT) COM>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Quote:
dorayme wrote:
In article <4736b$471d61cf$40cba7c2$5520 (AT) NAXS (DOT) COM>,
"Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

Hey, I saw that one! It was good. Many of yours with Bud-man or whatever
I have not watched.

Officer Bud White? Ah, there are only very few films that are any
good with him in them.

La Confidential
Master and Commander (a rollicking good tale)
Gladiator
The Sum of Us
Proof

Not seen any of those. Is this Crowe? I saw him in A Beautiful
Mind...okay but I was underwhelmed.
Yes. He just looked like he was acting in the film you refer to.
It was weak. In the boxing film, Cinderella Man, ditto. There
have been some very good boxing films, of course, The Set-Up, a
1949 movie with Robert Ryan, directed by Robert Wise. An
uncompromisingly fine film. Also Raging Bull (De Niro). In modern
times, brilliant for the first two thirds, Million Dollar Baby
(Eastwood), I did not like the melodramatic last third... I still
feel a terrible rage against the no good low down cheating fink
woman boxer who landed the heroine into paralysis. And I have
complained to Eastwood about letting this woman do quite such an
uncompromising thing to her opponent. I don't care if he did
follow the book. People's lives are at stake, following a book is
pretty pathetic. Anything can happen in a book. But not anything
can happen in a good book or film...

--
dorayme


Reply With Quote
  #10  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: forcing SPAN elements together in a single row - 10-23-2007 , 04:12 PM



Ted Zlatanov wrote:
Quote:
On Mon, 22 Oct 2007 22:11:30 -0400 "Jonathan N. Little" <lws4art (AT) centralva (DOT) net> wrote:

JNL> dorayme wrote:
How would a table help this problem?

JNL> Simple, it wouldn't.

I'm sorry to have confused the issue. Inside the spans I need images,
not just text. With tables I can force a row of N images side by
side, which is what I was alluding to:
So?

IMG are inline elements by default *IF* you don't trigger quirks mode or
have img { display: block; } in your stylesheet.

#d1 { white-space: nowrap; }

Will still fix your problem...


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.