Spacing text links in a single DIV

This is a discussion on "Spacing text links in a single DIV" within the Web Page Design section. This forum, and the thread "Spacing text links in a single DIV are both part of the Design Your Website category.



Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old Jan 29th, 2008, 08:02
Junior Member
Join Date: Jan 2008
Location: UK
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Spacing text links in a single DIV

Hi ,

If i have a single DIV what is the easiest way to evenly space text links with CSS , the method i found spaced each individual word ... i was looking for something more like this ....


Home About Us Contact Us


ps.i am looking for more spacing than is shown here though in the example

many thanks !!
Reply With Quote

  #2 (permalink)  
Old Jan 29th, 2008, 08:06
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
Re: Spacing text links in a single DIV

You could use the non breaking space:   between each links
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
  #3 (permalink)  
Old Jan 29th, 2008, 08:23
Junior Member
Join Date: Jan 2008
Location: UK
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Spacing text links in a single DIV

Quote:
Originally Posted by Monie View Post
You could use the non breaking space:   between each links

cheers , does that validate ok?
Reply With Quote
  #4 (permalink)  
Old Jan 29th, 2008, 08:24
Junior Member
Join Date: Jan 2008
Location: UK
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Spacing text links in a single DIV

or is there anything you could within a CSS style ??
Reply With Quote
  #5 (permalink)  
Old Jan 29th, 2008, 08:54
SuperMember

SuperMember
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Spacing text links in a single DIV

This is not a good choice of markup. Use a list instead:

Code: Select all
<ul>
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About us</a></li>
...
...
</ul>
Then use CSS to format this as you please -- make it horizontal, remove the bullets, whatever.
Reply With Quote
  #6 (permalink)  
Old Jan 29th, 2008, 09:29
welshstew's Avatar
Lead Administrator

SuperMember
Join Date: May 2007
Location: inside the outside
Posts: 1,388
Blog Entries: 13
Thanks: 1
Thanked 17 Times in 15 Posts
Re: Spacing text links in a single DIV

you can try the following as a starting point and go from there:
Code: Select all
#navigation {
    margin: 0 auto;
    text-align: center;
    width:800px;
    height: 40px;
    overflow: hidden;
    }
ul.nav {
    list-style: none;
    margin: 0;
    padding-top: 10px;
    }
ul.nav li {
    display:inline;
    color:#000066;
    width:800px;
    }
ul.nav li a:link, ul.nav li a:visited {
    font: Verdana, Arial, Helvetica, sans-serif;
    color: #ff6600;
    padding: 4px 10px 3px 10px;
    text-decoration: none;
    }    
ul.nav li a:hover {
    font: Verdana, Arial, Helvetica, sans-serif;
    color: #ff0000;
    text-decoration: none;
    background-color: #fff;
    padding-bottom: 1px;
    }
then add
HTML: Select all
<div id="navigation">
<ul class="nav">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About us</a></li>
...
...
</ul>
</div>
__________________
WelshStew
Lead Administrator

tierney rides tboard - uk site | xtreme wales - extreme clothing
If you think I've helped, click the "Thanks"
webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)

Last edited by welshstew; Jan 29th, 2008 at 09:32.
Reply With Quote
  #7 (permalink)  
Old Jan 30th, 2008, 00:32
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,608
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Send a message via Yahoo to Monie
Re: Spacing text links in a single DIV

Quote:
...what is the easiest way to evenly space text links with CSS
You should ask how to do a CSS styled menu
Welsh explained it CRYSTAL clear...
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Reply With Quote
  #8 (permalink)  
Old Jan 30th, 2008, 10:44
Junior Member
Join Date: Jan 2008
Location: UK
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Spacing text links in a single DIV

many thanks people!!!
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Different text spacing in IE than other browsers rubyfruit Web Page Design 18 Jan 23rd, 2008 12:31
Positioning Text, Links and Images DregondRahl Web Page Design 4 Jun 7th, 2007 11:34
Paid Text Links joelviztech Link Building and Link Sales 1 Aug 19th, 2006 09:50


All times are GMT. The time now is 02:56.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43