Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    Regular Coder
    Join Date
    Aug 2003
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How do I create a space/gap between words/images?

    Does anybody know how to create an invisible gap/space between words or images ON THE SAME LINE in an HTML scrolling script?

    i.e. Word (gap would be here) Word

    I am using a script including some jpeg images and want a space between image.

    Thanks,
    Brit

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    An invisible gap?

    For a "normal" gap, a space would sound ok, but an invisible gap... Perhaps you could elaborate, supply a link, show an example, etc.
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #3
    Regular Coder
    Join Date
    Aug 2003
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I just mean, if I wanted to create a sentence with say, 10 hits of the spacebar inbetween each word...

    So it would look like this:


    word word (has 10 hits of the spacebar inbetween each
    word)

    Thanks,
    Brit

  • #4
    Regular Coder
    Join Date
    Feb 2003
    Posts
    345
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Use   as many times as you need.
    Last edited by maltrecho; 09-15-2003 at 04:00 PM.

  • #5
    Regular Coder
    Join Date
    Aug 2003
    Posts
    102
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    Thanks very much maltrecho


    Brit

  • #6
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Alternatively...

    Text here<div style="padding: xxx"></div> More Text

    Where xxx is half your required space. This can be in px (pixels), %, or em (height of one capital letter, but with horizontal widths 2em, for example = two I's laid next to each other sideways).

    &amp;nbsp; is probably better though, its more precise.

    (Just a random comment, nbsp stands for non-breaking space )
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!

  • #7
    Regular Coder
    Join Date
    May 2003
    Location
    Manassas, VA, USA
    Posts
    220
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The easiest way to do it in CSS is to use a style of

    word-spacing: 4em (or px)

    for instance

    Code:
    <html>
    <head>
    <style type="text/css">
    div.spaced { word-spacing: 4em; }
    </style>
    </head>
    <body>
    <div class="spaced">word word word</div>
    </body>
    </html
    produces the same effect while keeping the source code readable (using &nbsp;, it doesn't look as readable.)

    You can adjust the number of "ems" (standard character widths) for a bigger space, or use a value such as 20px instead for 20 pixels.

    -Andrew
    Get the best Web Design books called Visual QuickStart Guides at the Peachpit Press
    Ithium Web Hosting

  • #8
    Regular Coder
    Join Date
    Jun 2003
    Location
    Spokane, WA
    Posts
    512
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Although that might be the easiest CSS way, we shouldn't overburden her with more info than she needs. Brit, if you want to continue in this business, or if you want to become alot better, you will eventually have to learn css. It helps a ton and it doesn't take that long to learn.

    However, for now, use &nbsp; multiple times. It'll work perfectly...or at least it should. Do you have an example of your site published? I would love to see it.

    -Ben
    Thoughts determine what you want,
    Actions determine what you get.

  • #9
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Originally posted by Ben@WEBProp

    However, for now, use &nbsp; multiple times. It'll work perfectly...or at least it should. Do you have an example of your site published? I would love to see it.

    -Ben
    He means &amp;nbsp; multimple times

  • #10
    me'
    me' is offline
    Senior Coder
    Join Date
    Nov 2002
    Location
    Warwickshire, England
    Posts
    1,229
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by Nightfire
    He means &amp;nbsp; multimple times
    &amp;amp;nbsp; to display that.
    Last edited by me'; 09-16-2003 at 06:53 PM.
    David House - Perfect is achieved, not when there is nothing left to add, but when there is nothing left to take away. (Antoine de St. Exupery).
    W3Schools | XHTML Validator | CSS Validator | Colours | Typography | HTML&CSS FAQ | Go get Mozilla Now | I blog!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •