...

View Full Version : How do I create a space/gap between words/images?



brit
09-15-2003, 02:06 PM
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

ronaldb66
09-15-2003, 02:33 PM
For a "normal" gap, a space would sound ok, but an invisible gap... :confused: Perhaps you could elaborate, supply a link, show an example, etc.

brit
09-15-2003, 02:47 PM
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

maltrecho
09-15-2003, 02:56 PM
Use   as many times as you need. :)

brit
09-15-2003, 03:23 PM
Thanks very much maltrecho:)


Brit

me'
09-15-2003, 05:31 PM
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 :thumbsup: )

STDestiny
09-16-2003, 12:01 AM
The easiest way to do it in CSS is to use a style of

word-spacing: 4em (or px)

for instance


<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

Ben@WEBProp
09-16-2003, 12:36 AM
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

Nightfire
09-16-2003, 12:39 AM
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 :)

me'
09-16-2003, 05:50 PM
Originally posted by Nightfire
He means &amp;nbsp; multimple times :)

&amp;amp;nbsp; to display that.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum