Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   HTML (http://www.velocityreviews.com/forums/f31-html.html)
-   -   prevent line end translate into white space (http://www.velocityreviews.com/forums/t162308-prevent-line-end-translate-into-white-space.html)

Greg N. 07-27-2005 12:52 PM

prevent line end translate into white space
 
The line end character translates into white space:

<span style="background: red;">X</span>
<span style="background: blue;">Y</span>
<span style="background: green;">Z</span>

This code generates three text boxes, separated by white spaces. If
that's not what you want, you can prevent it this way:

<span style="background: red;">X</span><span
style="background: blue;">Y</span><span
style="background: green;">Z</span>

That works fine, but the code looks messy. Is there a clean way to have
the browser *not* translate the line end into white space?

--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/

jlbdoc95 07-27-2005 01:42 PM

Re: prevent line end translate into white space
 
See if this will fit the bill for you:

<div style="background: red; display: inline;">X</div>
<div style="background: blue; display: inline;">Y</div>
<div style="background: green; display: inline;">Z</div>


"Greg N." <yodel_dodel@yahoo.com> wrote in message
news:dc802v$o1j$1@online.de...
> The line end character translates into white space:
>
> <span style="background: red;">X</span>
> <span style="background: blue;">Y</span>
> <span style="background: green;">Z</span>
>
> This code generates three text boxes, separated by white spaces. If
> that's not what you want, you can prevent it this way:
>
> <span style="background: red;">X</span><span
> style="background: blue;">Y</span><span
> style="background: green;">Z</span>
>
> That works fine, but the code looks messy. Is there a clean way to have
> the browser *not* translate the line end into white space?
>
> --
> Gregor's Motorradreisen:
> http://hothaus.de/greg-tour/




Barbara de Zoete 07-27-2005 04:43 PM

Re: prevent line end translate into white space
 
On Wed, 27 Jul 2005 09:42:49 -0400, jlbdoc95 <albina@NOSP@Mbigras.net> wrote:

[toppost fixed; do not toppost: quote the bit you reply to, attribute that too,
and reply underneith]

> "Greg N." <yodel_dodel@yahoo.com> wrote in message
> news:dc802v$o1j$1@online.de...
>> The line end character translates into white space:
>>
>> <span style="background: red;">X</span>
>> <span style="background: blue;">Y</span>
>> <span style="background: green;">Z</span>
>>
>> This code generates three text boxes, separated by white spaces. If
>> that's not what you want, you can prevent it this way:
>>
>> <span style="background: red;">X</span><span
>> style="background: blue;">Y</span><span
>> style="background: green;">Z</span>
>>
>> That works fine, but the code looks messy. Is there a clean way to have
>> the browser *not* translate the line end into white space?
>>


You (Greg) can always put the inline elements inline. Like:
<span>X</span><span>Y</span><span>Z</span>. In this nippet of yours it doesn't
really matter that they are inline or that 'the code looks messy'. Perhaps you
have a problem with a complicated document? Providing an URL gives more insight.

> See if this will fit the bill for you:
>
> <div style="background: red; display: inline;">X</div>
> <div style="background: blue; display: inline;">Y</div>
> <div style="background: green; display: inline;">Z</div>
>


How is replacing an inline element with a block level element going to resolve
having some white space displayed between the content of the elements? Even if
they get the property 'display:inline;'? Did you (jlbdoc95) try this yourself?
What results did you get[1]?

>> --
>> Gregor's Motorradreisen:


Please cut out the sig(nature) if your newsclient doesn't do that for you.


[1] Yes, I did try. No difference as was to be expected.
--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'


Greg N. 07-27-2005 04:52 PM

Re: prevent line end translate into white space
 
Barbara de Zoete wrote:

> You (Greg) can always put the inline elements inline. Like:
> <span>X</span><span>Y</span><span>Z</span>.


that's what I said in my example, isn't it?

> it doesn't really matter that they are inline or that
> 'the code looks messy'.


sure, functionally it does not matter. Did I imply otherwise?
Anyway, I think well structured, clean, readable code does matter in
terms of code maintainability. That's not really new news, is it?

> Perhaps you have a problem with a complicated document?


hmmm. are you trying to talk down on me?

--
Gregor's Motorradreisen:
http://hothaus.de/greg-tour/

Barbara de Zoete 07-27-2005 05:22 PM

Re: prevent line end translate into white space
 
On Wed, 27 Jul 2005 18:52:40 +0200, Greg N. <yodel_dodel@yahoo.com> wrote:

> Barbara de Zoete wrote:
>
>> You (Greg) can always put the inline elements inline. Like:
>> <span>X</span><span>Y</span><span>Z</span>.

>
> that's what I said in my example, isn't it?
>


That's not what I understood, when you gave the following:

>>> <span style="background: red;">X</span><span
>>> style="background: blue;">Y</span><span
>>> style="background: green;">Z</span>


I don't see how that is typed inline using three lines on purpose.

>> it doesn't really matter that they are inline or that 'the code looks
>> messy'.

>
> sure, functionally it does not matter. Did I imply otherwise?


But funcionally it _does_ matter. The white space is gone.

And being only a small bit of code, it doesn't matter that it looks messy. It
doesn't. So yes, you did imply otherwise.

> Anyway, I think well structured, clean, readable code does matter in terms of
> code maintainability. That's not really new news, is it?
>
>> Perhaps you have a problem with a complicated document?

>
> hmmm. are you trying to talk down on me?
>


? Fine. If not seeing why real code from a perhaps complicated document can
clearify your problem for those you seek advise from, go solve your own problems
then.

Plonk
--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'


JDS 07-27-2005 06:13 PM

Re: prevent line end translate into white space
 
On Wed, 27 Jul 2005 19:22:17 +0200, Barbara de Zoete wrote:

>>> Perhaps you have a problem with a complicated document?

>>
>> hmmm. are you trying to talk down on me?
>>

>
> ? Fine. If not seeing why real code from a perhaps complicated document can
> clearify your problem for those you seek advise from, go solve your own problems
> then.


Holy oversensitivity, Batman! (on both yer parts!)

--
JDS | jeffrey@example.invalid
| http://www.newtnotes.com
DJMBS | http://newtnotes.com/doctor-jeff-master-brainsurgeon/


jlbdoc95 07-27-2005 06:16 PM

Re: prevent line end translate into white space
 

"Barbara de Zoete" <b_de_zoete@hotmail.com> wrote in message
news:opsukzfluix5vgts@zoete_b...
> On Wed, 27 Jul 2005 09:42:49 -0400, jlbdoc95 <albina@NOSP@Mbigras.net>
> wrote:
>
> [toppost fixed; do not toppost: quote the bit you reply to, attribute that
> too, and reply underneith]
>
>> "Greg N." <yodel_dodel@yahoo.com> wrote in message
>> news:dc802v$o1j$1@online.de...
>>> The line end character translates into white space:
>>>
>>> <span style="background: red;">X</span>
>>> <span style="background: blue;">Y</span>
>>> <span style="background: green;">Z</span>
>>>
>>> This code generates three text boxes, separated by white spaces. If
>>> that's not what you want, you can prevent it this way:
>>>
>>> <span style="background: red;">X</span><span
>>> style="background: blue;">Y</span><span
>>> style="background: green;">Z</span>
>>>
>>> That works fine, but the code looks messy. Is there a clean way to have
>>> the browser *not* translate the line end into white space?
>>>

>
> You (Greg) can always put the inline elements inline. Like:
> <span>X</span><span>Y</span><span>Z</span>. In this nippet of yours it
> doesn't really matter that they are inline or that 'the code looks
> messy'. Perhaps you have a problem with a complicated document? Providing
> an URL gives more insight.
>

Greg, I guess it depends what you are trying to achieve.

>> See if this will fit the bill for you:
>>
>> <div style="background: red; display: inline;">X</div>
>> <div style="background: blue; display: inline;">Y</div>
>> <div style="background: green; display: inline;">Z</div>

Only for IE above, and this will fix it for all:
<div style="background: red; display: inline; float: left;">X</div>
<div style="background: blue; display: inline; float: left;">Y</div>
<div style="background: green; display: inline; float: left;">Z</div>


>>

>
> How is replacing an inline element with a block level element going to
> resolve having some white space displayed between the content of the
> elements? Even if they get the property 'display:inline;'? Did you
> (jlbdoc95) try this yourself?

With block elements, you can control the spacing, I just was a little quick
on the trigger.

> What results did you get[1]?

Yes I had, but only in IE [2]
>
>>> --
>>> Gregor's Motorradreisen:

>
> Please cut out the sig(nature) if your newsclient doesn't do that for you.
>
>
> [1] Yes, I did try. No difference as was to be expected.

[2] Guess I should have tried it out in FF/Moz



Barbara de Zoete 07-27-2005 06:20 PM

Re: prevent line end translate into white space
 
On Wed, 27 Jul 2005 14:13:23 -0400, JDS <jeffrey@example.invalid> wrote:

> Holy oversensitivity, Batman! (on both yer parts!)
>


No, not oversensitive.

Just not willing to tiptoe around when the other party is around too. Not
interested in why he thought I was talking him down. Not interested in
discussing his emotional perception of this medium. Not willing to invest in 'a
long lasting relationship'. I see nothing coming of all of that.

Just want to keep my [inbox] clean. That's all.

--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'


Neredbojias 07-28-2005 12:25 PM

Re: prevent line end translate into white space
 
With neither quill nor qualm, Barbara de Zoete quothed:

> No, not oversensitive.
>
> Just not willing to tiptoe around when the other party is around too. Not
> interested in why he thought I was talking him down. Not interested in
> discussing his emotional perception of this medium. Not willing to invest in 'a
> long lasting relationship'. I see nothing coming of all of that.
>
> Just want to keep my [inbox] clean. That's all.


If I get this correctly, you're a woman who likes one-night-stands and
condoms??

--
Neredbojias
Contrary to popular belief, it is believable.


All times are GMT. The time now is 07:53 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57