473,406 Members | 2,849 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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.html" target="_top">Home</a> <a
href="about.html" target="_top">The Company</a> <a
href="products.html"target="_top">Products</a> <a href="download.html"
target="_top">Downloads</a> <a href="contact.html"
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?

Thanks,

Corey

Mar 14 '06 #1
3 1533
DigMar wrote on 14 mrt 2006 in comp.lang.javascript:
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.html" target="_top">Home</a> <a
href="about.html" target="_top">The Company</a> <a
href="products.html"target="_top">Products</a> <a href="download.html"
target="_top">Downloads</a> <a href="contact.html"
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?


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**********************@e56g2000cwe.googlegroups .com>
, dated Tue, 14 Mar 2006 08:37:17 remote, seen in
news:comp.lang.javascript, DigMar <in**@digitalmarketing1.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.html" target="_top">Home</a> <a
href="about.html" target="_top">The Company</a> <a
href="products.html"target="_top">Products</a> <a href="download.html"
target="_top">Downloads</a> <a href="contact.html"
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;Company".

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.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.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
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...
2
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:...
5
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. ...
3
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...
2
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...
1
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...
2
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...
10
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...
4
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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,...
0
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...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.