473,563 Members | 2,735 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Spacing Words in Header

Hello,

Thi is a newbie question regarding the spacing of words in a header
with links. I simply want to space the clickable words on my header bar
more horizontally. Here is my code to make more sense:
// HEADER MENU OPTIONS

document.write( '<span class="header"> ');
document.write( '<a href="index.htm l" target="_top">H ome</a> <a
href="about.htm l" target="_top">T he Company</a> <a
href="products. html"target="_t op">Products</a> <a href="download. html"
target="_top">D ownloads</a> <a href="contact.h tml"
target="_top">C ontact</a><br>');
// -- END -->
I want the linked headers, Home, The Company, Products, Downloads and
Contact to be spaced apart more horizontally, maybe 10 spaces or so so
it doesn't look like a strange sentence. Can this be done?

Thanks,

Corey

Mar 14 '06 #1
3 1543
DigMar wrote on 14 mrt 2006 in comp.lang.javas cript:
Thi is a newbie question regarding the spacing of words in a header
with links. I simply want to space the clickable words on my header bar
more horizontally. Here is my code to make more sense:

// HEADER MENU OPTIONS

document.write( '<span class="header"> ');
document.write( '<a href="index.htm l" target="_top">H ome</a> <a
href="about.htm l" target="_top">T he Company</a> <a
href="products. html"target="_t op">Products</a> <a href="download. html"
target="_top">D ownloads</a> <a href="contact.h tml"
target="_top">C ontact</a><br>');
// -- END -->

I want the linked headers, Home, The Company, Products, Downloads and
Contact to be spaced apart more horizontally, maybe 10 spaces or so so
it doesn't look like a strange sentence. Can this be done?


Yes, but that does not make it a javascript question.
Putting a piece of HTML in document.write( ) doesn't help a bit.

Look at and in their NGs: HTML and CSS.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 14 '06 #2
You will want to set the word-spacing property of class header to some
value greater than 0.

http://www.w3.org/TR/CSS2/text.html#spacing-props

Mar 14 '06 #3
JRS: In article <11************ **********@e56g 2000cwe.googleg roups.com>
, dated Tue, 14 Mar 2006 08:37:17 remote, seen in
news:comp.lang. javascript, DigMar <in**@digitalma rketing1.com> posted :
Thi is a newbie question regarding the spacing of words in a header
with links. I simply want to space the clickable words on my header bar
more horizontally. Here is my code to make more sense:

// HEADER MENU OPTIONS

document.write ('<span class="header"> ');
document.write ('<a href="index.htm l" target="_top">H ome</a> <a
href="about.ht ml" target="_top">T he Company</a> <a
href="products .html"target="_ top">Products</a> <a href="download. html"
target="_top"> Downloads</a> <a href="contact.h tml"
target="_top"> Contact</a><br>');
// -- END -->
I want the linked headers, Home, The Company, Products, Downloads and
Contact to be spaced apart more horizontally, maybe 10 spaces or so so
it doesn't look like a strange sentence. Can this be done?


Not really a javascript question; there might be a javascript answer.

When posting code, don't allow your agent to wrap lines; posted code
should be directly executable. See FAQ.

You could pad the gaps with alternate   (or &nbsp;) and space;
adding a pair of those should be enough.

You could deem it a Table, and mark it as such; that way, you could get
forms of spacing other than equal-gap.

You could use CSS, but you'll then have to consider whether the required
form of spacing is available in all target browsers. Word-spacing,
which you ask for, will probably not be satisfactory with an entry like
"The Company", but might be so with "The&nbsp;Compa ny".

Your script could be compacted by setting, for example,
S1 = 'target="_top"' and using that repeatedly - only the filename and
the visible string need to be given each time. Not worthwhile for a
single use, but could be if multiply-used.

--
© John Stockton, Surrey, UK. ?@merlyn.demon. co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.c om/faq/> JL/RC: FAQ of news:comp.lang. javascript
<URL:http://www.merlyn.demo n.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demo n.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Mar 15 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1513
by: Ding Lei | last post by:
Hello folks, I am using xml for a newsletter, along with a xsl file to display it in a browser. In the xml file, a newline, tab or whitespace character all causes exactly one spacing between two words. That's generally OK for English or other european languages. But since I am using Chinese, in our convention, there shall not be any spacing...
2
3404
by: Ryan | last post by:
(Sorry if this gets posted twice. News server acted up on me.) Greetings - I am in the last stages of developing a site for a musician, and I have a few questions. Site in question: http://www.chancesend.com/test/info.html (I am aware that none of the top navigation links work. I am also aware that the Mailing List portion does not...
5
12107
by: Poonam | last post by:
Hi there. How can i maintain the spacing between to divs if palced side by side with 10px spacing between them.. Not using any tables. And atleast making one of the div relative positioning. Tks poonam.
3
2187
by: JBH | last post by:
I'm having difficulty removing spacing between two rows in a table. Below is a copy of my source code <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>About Isadore Gallery</title> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <meta name="keywords" content="history of...
2
1498
by: Lumpierbritches | last post by:
Thank you in advance for any and all assistance. I'm trying to create a report that will work similar to the label wizard in Access. I have a premade form I'm attempting to fill with data from the db. I can manually make the information fit, by making the report the full 8.5" x 11", however, when I attempt to size the report so that an...
1
2634
by: David Gibson | last post by:
Hi, Is there a function to remove double spacing between some names in a text field. I have a text field with names where the name can be 1, 2, 3 or rarely 4 words & there is dounle spacing between them. I wish to trim out the double spacing to single. The TRIM functions I have found only seem to work on left or right, ie leading or...
2
1633
by: Greg Linwood | last post by:
I'm using a Data Grid and want to apply wider spacing between columns than rows. As such, cellspacing / padding aren't any use to me. I used to do this in html tables by simply adding columns with a single point transparent .gif, set to a specific .pt width. This worked very well for precise alignment. I can't find an easy way to do this...
10
11028
by: phil-news-nospam | last post by:
I have a table with 3 columns in 1 row. I want to increase the spacing _between_ the columns (gutter) _without_ increasing the spacing between those columns and the table itself. Is there a way to do that in CSS without having to code in extra dummy columns in HTML to create gutters? --...
4
2191
by: Mamluk Caliph | last post by:
For quite some time I've used code as the following to be able to "cut&paste" parts from different headerfiles of the same name. It has worked with GCC, MS, Borland, Keil to name a few. In principle the mechanism looks like this: #define CHAINPATH /usr/include #define DEFSTR( x ) \ #x
0
7659
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7882
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8103
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7634
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7945
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5481
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5208
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3634
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1194
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.