inserting blank space in html

Discussion in 'HTML' started by Tony Vella, Nov 21, 2003.

  1. Tony Vella

    Tony Vella Guest

    Can anyone please tell me how to insert a longish blank space in html which
    IE would recognize. Let's say a space between "blank" and "space" the size
    of "blank". TIA.
    --
    Tony Vella in Ottawa, Canada
    Tony Vella, Nov 21, 2003
    #1
    1. Advertising

  2. Tony Vella wrote:
    > Can anyone please tell me how to insert a longish blank space in html
    > which IE would recognize. Let's say a space between "blank" and
    > "space" the size of "blank". TIA.


    CSS:
    p span {margin-left:5ex;}

    HTML:
    <p>blank <span>space</span></p>

    modify margin value to suit.

    --
    William Tasso - http://WilliamTasso.com
    William Tasso, Nov 21, 2003
    #2
    1. Advertising

  3. Tony Vella

    Tony Vella Guest

    William Tasso wrote:
    > Tony Vella wrote:
    >> Can anyone please tell me how to insert a longish blank space in html
    >> which IE would recognize. Let's say a space between "blank" and
    >> "space" the size of "blank". TIA.

    >
    > CSS:
    > p span {margin-left:5ex;}
    >
    > HTML:
    > <p>blank <span>space</span></p>
    >
    > modify margin value to suit.


    Sorry, can't get the html to work. I'll try to show below what effect I'm
    after.
    *there was an old lady who lived in a shoe.*
    (In case it doesn't show) I am trying to put, say, 10em between "lady" and
    "who"
    Thanks for helping William.
    --
    Tony Vella in Ottawa, Canada
    Tony Vella, Nov 21, 2003
    #3
  4. Tony Vella

    rf Guest

    "Tony Vella" <> wrote in message
    news:u2evb.4628$...
    > William Tasso wrote:
    > > Tony Vella wrote:
    > >> Can anyone please tell me how to insert a longish blank space in html
    > >> which IE would recognize. Let's say a space between "blank" and
    > >> "space" the size of "blank". TIA.

    > >
    > > CSS:
    > > p span {margin-left:5ex;}
    > >
    > > HTML:
    > > <p>blank <span>space</span></p>
    > >
    > > modify margin value to suit.

    >
    > Sorry, can't get the html to work.


    What? There is only one line :)

    You *did* put the CSS up in your <head>, didn't you?

    > I'll try to show below what effect I'm
    > after.
    > *there was an old lady who lived in a shoe.*
    > (In case it doesn't show) I am trying to put, say, 10em between "lady" and
    > "who"


    Which is what Williams example does, exactly. Well, not exactly, you would
    have to specify margin-left: 10em.

    Cheers
    Richard.
    rf, Nov 21, 2003
    #4
  5. Tony Vella

    Mark Parnell Guest

    Sometime around Fri, 21 Nov 2003 00:57:41 -0000, William Tasso is reported
    to have stated:
    > Tony Vella wrote:
    >> Can anyone please tell me how to insert a longish blank space in html
    >> which IE would recognize. Let's say a space between "blank" and
    >> "space" the size of "blank". TIA.

    >
    > CSS:
    > p span {margin-left:5ex;}
    >
    > HTML:
    > <p>blank <span>space</span></p>
    >
    > modify margin value to suit.


    The other option would be to add a whole pile of non-breaking spaces
    between the words. Depending on the purpose of the space (the OP was very
    vague on that subject), this may be a better option, since non-CSS browsers
    would still see the space. It could cause other undesirable results,
    though.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
    Mark Parnell, Nov 21, 2003
    #5
  6. Tony Vella

    Tony Vella Guest

    rf wrote:
    > "Tony Vella" <> wrote in message
    > news:u2evb.4628$...
    >> William Tasso wrote:
    >>> Tony Vella wrote:
    >>>> Can anyone please tell me how to insert a longish blank space in
    >>>> html which IE would recognize. Let's say a space between "blank"
    >>>> and "space" the size of "blank". TIA.
    >>>
    >>> CSS:
    >>> p span {margin-left:5ex;}
    >>>
    >>> HTML:
    >>> <p>blank <span>space</span></p>
    >>>
    >>> modify margin value to suit.

    >>
    >> Sorry, can't get the html to work.

    >
    > What? There is only one line :)
    >
    > You *did* put the CSS up in your <head>, didn't you?
    >
    >> I'll try to show below what effect I'm
    >> after.
    >> *there was an old lady who lived in a shoe.*
    >> (In case it doesn't show) I am trying to put, say, 10em between
    >> "lady" and "who"

    >
    > Which is what Williams example does, exactly. Well, not exactly, you
    > would have to specify margin-left: 10em.
    >
    > Cheers
    > Richard.


    Hi Richard. Please don't misunderstand my question: I don't expect anyone
    to take the time (waste his time actually) to spoon-feed me. But now I'm
    getting pigheaded with this damn thing. Here are a few more details:

    I have a text and between two particular words, say "red" and "white" I want
    a space, say of 15em. So somewhere between <head> and </head> I type
    CSS: p span {margin-left:5ex;}
    then in the text I enter
    <p>red<span>white</span></p>

    What is happening is (one) CSS: p span {margin-left:5ex;}is showing in IE as
    text at the top of the page and (two) I am getting a paragraph break right
    before red.

    In addition, I already have a CSS with these entries.

    span {
    font-family: serif;
    font-size: smaller;
    }

    If I include a margin-left= entry, all the spans in the document will be
    effected and not just the one between red and white. I have tried using
    non-break spaces but it does look rather "untidy" if you wished to do it a
    few times throughout the document. Thanks again.
    --
    Tony Vella in Ottawa, Canada
    Tony Vella, Nov 21, 2003
    #6
  7. Tony Vella

    Tony Vella Guest

    Re: inserting blank space in html - correction

    Tony Vella wrote:
    > rf wrote:
    >> "Tony Vella" <> wrote in message
    >> news:u2evb.4628$...
    >>> William Tasso wrote:
    >>>> Tony Vella wrote:
    >>>>> Can anyone please tell me how to insert a longish blank space in
    >>>>> html which IE would recognize. Let's say a space between "blank"
    >>>>> and "space" the size of "blank". TIA.
    >>>>
    >>>> CSS:
    >>>> p span {margin-left:5ex;}
    >>>>
    >>>> HTML:
    >>>> <p>blank <span>space</span></p>
    >>>>
    >>>> modify margin value to suit.
    >>>
    >>> Sorry, can't get the html to work.

    >>
    >> What? There is only one line :)
    >>
    >> You *did* put the CSS up in your <head>, didn't you?
    >>
    >>> I'll try to show below what effect I'm
    >>> after.
    >>> *there was an old lady who lived in a shoe.*
    >>> (In case it doesn't show) I am trying to put, say, 10em between
    >>> "lady" and "who"

    >>
    >> Which is what Williams example does, exactly. Well, not exactly, you
    >> would have to specify margin-left: 10em.
    >>
    >> Cheers
    >> Richard.

    >
    > Hi Richard. Please don't misunderstand my question: I don't expect
    > anyone to take the time (waste his time actually) to spoon-feed me.
    > But now I'm getting pigheaded with this damn thing. Here are a few
    > more details:
    >
    > I have a text and between two particular words, say "red" and "white"
    > I want a space, say of 15em. So somewhere between <head> and </head>
    > I type
    > CSS: p span {margin-left:15em;}
    > then in the text I enter
    > <p>red<span>white</span></p>
    >
    > What is happening is (one) CSS: p span {margin-left:5ex;}is showing
    > in IE as text at the top of the page and (two) I am getting a
    > paragraph break right before red.
    >
    > In addition, I already have a CSS with these entries.
    >
    > span {
    > font-family: serif;
    > font-size: smaller;
    > }
    >
    > If I include a margin-left= entry, all the spans in the document will
    > be effected and not just the one between red and white. I have tried
    > using non-break spaces but it does look rather "untidy" if you wished
    > to do it a few times throughout the document. Thanks again.




    --
    Tony Vella in Ottawa, Canada
    Tony Vella, Nov 21, 2003
    #7
  8. Tony Vella

    rf Guest

    "Tony Vella" <> wrote in message
    news:wvfvb.5106$...
    > rf wrote:
    > > "Tony Vella" <> wrote in message
    > > news:u2evb.4628$...
    > >> William Tasso wrote:
    > >>> Tony Vella wrote:
    > >>>> Can anyone please tell me how to insert a longish blank space in
    > >>>> html which IE would recognize. Let's say a space between "blank"
    > >>>> and "space" the size of "blank". TIA.
    > >>>
    > >>> CSS:
    > >>> p span {margin-left:5ex;}
    > >>>
    > >>> HTML:
    > >>> <p>blank <span>space</span></p>
    > >>>
    > >>> modify margin value to suit.
    > >>
    > >> Sorry, can't get the html to work.

    > >
    > > What? There is only one line :)
    > >
    > > You *did* put the CSS up in your <head>, didn't you?
    > >
    > >> I'll try to show below what effect I'm
    > >> after.
    > >> *there was an old lady who lived in a shoe.*
    > >> (In case it doesn't show) I am trying to put, say, 10em between
    > >> "lady" and "who"

    > >
    > > Which is what Williams example does, exactly. Well, not exactly, you
    > > would have to specify margin-left: 10em.
    > >
    > > Cheers
    > > Richard.

    >
    > Hi Richard. Please don't misunderstand my question: I don't expect anyone
    > to take the time (waste his time actually) to spoon-feed me. But now I'm
    > getting pigheaded with this damn thing. Here are a few more details:
    >
    > I have a text and between two particular words, say "red" and "white" I

    want
    > a space, say of 15em. So somewhere between <head> and </head> I type
    > CSS: p span {margin-left:5ex;}
    > then in the text I enter
    > <p>red<span>white</span></p>


    <html>
    <head>
    <title>words</title>
    <style type="text/css">
    p span {margin-left: 15em;}
    </style>
    </head>
    <body>
    <p>some text that comes before the word "red"<span>white</span>some
    following text</p>
    </body>
    </head>


    > What is happening is (one) CSS: p span {margin-left:5ex;}is showing in IE

    as
    > text at the top of the page and (two) I am getting a paragraph break right
    > before red.
    >
    > In addition, I already have a CSS with these entries.
    >
    > span {
    > font-family: serif;
    > font-size: smaller;


    Don't use a font-size smaller than 100%.


    > }
    >
    > If I include a margin-left= entry, all the spans in the document will be
    > effected and not just the one between red and white. I have tried using
    > non-break spaces but it does look rather "untidy" if you wished to do it a
    > few times throughout the document. Thanks again.


    ..wide {margin-left: 15em;}

    .... <span class="wide">white</span>

    Cheers
    Richard.
    rf, Nov 21, 2003
    #8
  9. Tony Vella

    Sid Ismail Guest

    On Fri, 21 Nov 2003 03:19:56 GMT, "Tony Vella" <>
    wrote:

    : What is happening is (one) CSS: p span {margin-left:5ex;}is showing in IE as
    : text at the top of the page


    The "CSS:" means that you insert this into your head

    <style type="text/css">
    <!--
    p span {margin-left:5ex;}
    -->
    </style>

    Methinks you need this tutorial:
    http://www.westciv.com/style_master/academy/hands_on_tutorial/


    If that is not on, then stick in a filler.gif width=10 height=1.

    Sid
    Sid Ismail, Nov 21, 2003
    #9
  10. Tony Vella

    Tony Vella Guest

    "rf" <> wrote in message
    news:qUgvb.19868$...
    >
    > "Tony Vella" <> wrote in message
    > news:wvfvb.5106$...
    > > rf wrote:
    > > > "Tony Vella" <> wrote in message
    > > > news:u2evb.4628$...
    > > >> William Tasso wrote:
    > > >>> Tony Vella wrote:
    > > >>>> Can anyone please tell me how to insert a longish blank space in
    > > >>>> html which IE would recognize. Let's say a space between "blank"
    > > >>>> and "space" the size of "blank". TIA.
    > > >>>
    > > >>> CSS:
    > > >>> p span {margin-left:5ex;}
    > > >>>
    > > >>> HTML:
    > > >>> <p>blank <span>space</span></p>
    > > >>>
    > > >>> modify margin value to suit.
    > > >>
    > > >> Sorry, can't get the html to work.
    > > >
    > > > What? There is only one line :)
    > > >
    > > > You *did* put the CSS up in your <head>, didn't you?
    > > >
    > > >> I'll try to show below what effect I'm
    > > >> after.
    > > >> *there was an old lady who lived in a shoe.*
    > > >> (In case it doesn't show) I am trying to put, say, 10em between
    > > >> "lady" and "who"
    > > >
    > > > Which is what Williams example does, exactly. Well, not exactly, you
    > > > would have to specify margin-left: 10em.
    > > >
    > > > Cheers
    > > > Richard.

    > >
    > > Hi Richard. Please don't misunderstand my question: I don't expect

    anyone
    > > to take the time (waste his time actually) to spoon-feed me. But now

    I'm
    > > getting pigheaded with this damn thing. Here are a few more details:
    > >
    > > I have a text and between two particular words, say "red" and "white" I

    > want
    > > a space, say of 15em. So somewhere between <head> and </head> I type
    > > CSS: p span {margin-left:5ex;}
    > > then in the text I enter
    > > <p>red<span>white</span></p>

    >
    > <html>
    > <head>
    > <title>words</title>
    > <style type="text/css">
    > p span {margin-left: 15em;}
    > </style>
    > </head>
    > <body>
    > <p>some text that comes before the word "red"<span>white</span>some
    > following text</p>
    > </body>
    > </head>
    >
    >
    > > What is happening is (one) CSS: p span {margin-left:5ex;}is showing in

    IE
    > as
    > > text at the top of the page and (two) I am getting a paragraph break

    right
    > > before red.
    > >
    > > In addition, I already have a CSS with these entries.
    > >
    > > span {
    > > font-family: serif;
    > > font-size: smaller;

    >
    > Don't use a font-size smaller than 100%.
    >
    >
    > > }
    > >
    > > If I include a margin-left= entry, all the spans in the document will be
    > > effected and not just the one between red and white. I have tried using
    > > non-break spaces but it does look rather "untidy" if you wished to do it

    a
    > > few times throughout the document. Thanks again.

    >
    > .wide {margin-left: 15em;}
    >
    > ... <span class="wide">white</span>
    >
    > Cheers
    > Richard.


    Finally I got through my thick skull. Old age isn't fun! Thanks a lot
    guys!
    --
    Tony Vella in Ottawa, Canada
    Tony Vella, Nov 21, 2003
    #10
  11. "rf" <> wrote:

    > p span {margin-left: 15em;}


    If that "works", it's a browser bug. By CSS specifications, margin
    properties do not apply to inline elements like span. (It is well known that
    IE violates the specifications in this respect. Mozilla, Opera, etc. don't.)

    Use padding-left instead.

    > <p>some text that comes before the word "red"<span>white</span>some
    > following text</p>


    When CSS is not in use, that displays as
    .... the word "red"white some ...
    so I think you should put a space before the <span> tag.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Nov 21, 2003
    #11
  12. Tony Vella

    Tony Vella Guest

    "Jukka K. Korpela" <> wrote in message
    news:Xns943AEBC40BDB0jkorpelacstutfi@193.229.0.31...
    > "rf" <> wrote:
    >
    > > p span {margin-left: 15em;}

    >
    > If that "works", it's a browser bug. By CSS specifications, margin
    > properties do not apply to inline elements like span. (It is well known

    that
    > IE violates the specifications in this respect. Mozilla, Opera, etc.

    don't.)
    >
    > Use padding-left instead.
    >
    > > <p>some text that comes before the word "red"<span>white</span>some
    > > following text</p>

    >
    > When CSS is not in use, that displays as
    > ... the word "red"white some ...
    > so I think you should put a space before the <span> tag.



    Thank you very much Yukka.
    As per someone else's recommendation I have found a way out. I created a
    transparent gif 10px high by 10px wide. I insert it wherever I need a space
    and adjust the width. It's rather a simplistic way but works perfectly
    every time. I am a stamp collector not a code writer, I'm afraid - I am
    having a ball creating virtual albums of different stamp collections.
    Example: http://members.rogers.com/tony.vella/mexico/index.html
    --
    Tony Vella in Ottawa, Canada
    Tony Vella, Nov 21, 2003
    #12
  13. "Tony Vella" <> wrote:

    > As per someone else's recommendation I have found a way out. I created
    > a transparent gif 10px high by 10px wide. I insert it wherever I need a
    > space and adjust the width.


    I wonder why you do it the hard and clumsy way when the simple and modern
    way had been explained.

    > I am a stamp collector not a code writer,


    Actually, it seems to me that you have done quite some unnecessary coding at
    > http://members.rogers.com/tony.vella/mexico/index.html

    and the associated pages. And I cannot really see your original problem
    there. If you had explained that you are using tables, and had illustrated
    the situation with a URL, we might have addressed the real problems from the
    start.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Nov 21, 2003
    #13
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?ZGVlcGFrIGt1bWFy?=

    inserting html dropdownlist 's text into blank table

    =?Utf-8?B?ZGVlcGFrIGt1bWFy?=, Nov 2, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    643
    =?Utf-8?B?ZGVlcGFrIGt1bWFy?=
    Nov 2, 2004
  2. Shuo Xiang

    Stack space, global space, heap space

    Shuo Xiang, Jul 9, 2003, in forum: C Programming
    Replies:
    10
    Views:
    2,893
    Bryan Bullard
    Jul 11, 2003
  3. Christian Seberino
    Replies:
    21
    Views:
    1,655
    Stephen Horne
    Oct 27, 2003
  4. Ian Bicking
    Replies:
    2
    Views:
    1,010
    Steve Lamb
    Oct 23, 2003
  5. Ian Bicking
    Replies:
    2
    Views:
    723
    Michael Hudson
    Oct 24, 2003
Loading...

Share This Page