473,651 Members | 2,549 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nav table into css?

I have a very simple navigation "menu" in the middle of my page. It is
three simple links and it lays out horizontally. To achieve this, I
used the following table:

<table align=center width="40%">
<tr>
<td align=left width="13%"><a href="#auctions ">Auctions</a></td>
<td align=center width="13%"><a href="gallery.h tm">Gallery</a></td>
<td align=right width="13%"><a
href="mailto:Ja *************** *******@yahoo.c om">Contact</a></td>
</tr>
</table>

I can already hear you yelling "Don't use tables for layout!" Well,
that's why I'm here, because I cannot figure out how to achieve the
above "layout" without using a table.
I tried the following:

<div style="text-align: center;">
<div style="text-align: left; width: 13%; display: inline;">
<a href="#auctions ">Auctions</a>
</div>
<div style="text-align: center; width: 13%; display: inline;">
<a href="gallery.h tm">Gallery</a>
</div>
<div style="text-align: right; width: 13%; display: inline;">
<a href="mailto:Ja *************** *******@yahoo.c om">Contact</a>
</div>
</div>

It worked in IE but not Moz.
Then I added http://www.w3.org/TR/html4/loose.dtd to the DTD and it
didn't work in either browser, which indicates to me that it just
won't work. (Note to MS: stop fixing my mistakes!)
Is there any way to replicate the table layout using only CSS?
Thanks
Jul 20 '05 #1
24 2709
Jane Withnolastname <Ja************ **********@yaho o.com> wrote in
news:p5******** *************** *********@4ax.c om:
I have a very simple navigation "menu" in the middle of my page.
It is three simple links and it lays out horizontally. To
achieve this, I used the following table:

[snip HTML]

[snip CSS]

It worked in IE but not Moz.


Try these sites; they have tutorials on Horizontal Menus
(as well as vertical ones):

Listamatic: http://www.maxdesign.com.au/presentation/listamatic/
Listutorial: http://www.maxdesign.com.au/presentation/listutorial/
List-o-matic: http://www.accessify.com/tools-and-w...st-o-matic.asp
Taming Lists: http://www.alistapart.com/stories/taminglists/

--
Kayode Okeyode
http://www.kayodeok.btinternet.co.uk.../webdesign.htm
Jul 20 '05 #2
On Thu, 25 Sep 2003 04:49:24 GMT, Jane Withnolastname
<Ja************ **********@yaho o.com> wrote:
I have a very simple navigation "menu" in the middle of my page. It is
three simple links and it lays out horizontally. To achieve this, I
used the following table:

<table align=center width="40%">
<tr>
<td align=left width="13%"><a href="#auctions ">Auctions</a></td>
<td align=center width="13%"><a href="gallery.h tm">Gallery</a></td>
<td align=right width="13%"><a
href="mailto:J a************** ********@yahoo. com">Contact</a></td>
</tr>
</table>

I can already hear you yelling "Don't use tables for layout!" Well,
that's why I'm here, because I cannot figure out how to achieve the
above "layout" without using a table.


It looks as if you are trying to do the same as I do in the footer on my
pages - see sig. Have a look and see if that helps.

--
Stephen Poley

http://www.xs4all.nl/~sbpoley/webmatters/
Jul 20 '05 #3
Jane Withnolastname pounced upon this pigeonhole and pronounced:

[I tried to post this about 10 hours ago; seems to have gotten eaten.]
I have a very simple navigation "menu" in the middle of my page. It is
three simple links and it lays out horizontally. To achieve this, I
used the following table: <snip table>
I can already hear you yelling "Don't use tables for layout!"
"Don't use tables for layout!"
Well,
that's why I'm here, because I cannot figure out how to achieve the
above "layout" without using a table.
I tried the following: <snip try>

The CSS:
<style type="text/css">
#nav {
text-align: center;
}
#nav li {
display: inline;
list-style-type: none;
padding: 0 5% 0;
}
</style>

The HTML:

<div id="nav">
<ul>
<li><a href="#auctions ">Auctions</a></li>
<li><a href="gallery.h tm">Gallery</a></li>
<li><a href="mailto:Ja *************** *******@yahoo.c om">Contact</a></li>
</ul>
</div>

It worked in IE but not Moz.
The above tested in IE6 and Firebird.
Then I added http://www.w3.org/TR/html4/loose.dtd to the DTD and it


New documents should be Strict...

If you want them to look like buttons (with CSS), holler. Others will
tell you about not using "mailto:" <g>

--
-bts
-This space intentionally left blank.
Jul 20 '05 #4
Jane Withnolastname pounced upon this pigeonhole and pronounced:
I have a very simple navigation "menu" in the middle of my page. It is
three simple links and it lays out horizontally. To achieve this, I
used the following table: <snip table>
I can already hear you yelling "Don't use tables for layout!"
"Don't use tables for layout!"
Well,
that's why I'm here, because I cannot figure out how to achieve the
above "layout" without using a table.
I tried the following: <snip try>

The CSS:
<style type="text/css">
#nav {
text-align: center;
}
#nav li {
display: inline;
list-style-type: none;
padding: 0 5% 0;
}
</style>

The HTML:

<div id="nav">
<ul>
<li><a href="#auctions ">Auctions</a></li>
<li><a href="gallery.h tm">Gallery</a></li>
<li><a href="mailto:Ja *************** *******@yahoo.c om">Contact</a></li>
</ul>
</div>

It worked in IE but not Moz.
The above tested in IE6 and Firebird.
Then I added http://www.w3.org/TR/html4/loose.dtd to the DTD and it


New documents should be Strict...

If you want them to look like buttons (with CSS), holler. Others will
tell you about not using "mailto:" <g>

--
-bts
-This space intentionally left blank.
Jul 20 '05 #5
Jane Withnolastname pounced upon this pigeonhole and pronounced:
I have a very simple navigation "menu" in the middle of my page. It is
three simple links and it lays out horizontally. To achieve this, I
used the following table: <snip table>
I can already hear you yelling "Don't use tables for layout!"
"Don't use tables for layout!"
Well,
that's why I'm here, because I cannot figure out how to achieve the
above "layout" without using a table.
I tried the following: <snip try>

The CSS:
<style type="text/css">
#nav {
text-align: center;
}
#nav li {
display: inline;
list-style-type: none;
padding: 0 5% 0;
}
</style>

The HTML:

<div id="nav">
<ul>
<li><a href="#auctions ">Auctions</a></li>
<li><a href="gallery.h tm">Gallery</a></li>
<li><a href="mailto:Ja *************** *******@yahoo.c om">Contact</a></li>
</ul>
</div>

It worked in IE but not Moz.
The above tested in IE6 and Firebird.
Then I added http://www.w3.org/TR/html4/loose.dtd to the DTD and it


New documents should be Strict...

If you want them to look like buttons (with CSS), holler. Others will
tell you about not using "mailto:" <g>

--
-bts
-This space intentionally left blank.
Jul 20 '05 #6
Jane Withnolastname pounced upon this pigeonhole and pronounced:

[I tried to post this about 10 hours ago; seems to have gotten eaten.]
I have a very simple navigation "menu" in the middle of my page. It is
three simple links and it lays out horizontally. To achieve this, I
used the following table: <snip table>
I can already hear you yelling "Don't use tables for layout!"
"Don't use tables for layout!"
Well,
that's why I'm here, because I cannot figure out how to achieve the
above "layout" without using a table.
I tried the following: <snip try>

The CSS:
<style type="text/css">
#nav {
text-align: center;
}
#nav li {
display: inline;
list-style-type: none;
padding: 0 5% 0;
}
</style>

The HTML:

<div id="nav">
<ul>
<li><a href="#auctions ">Auctions</a></li>
<li><a href="gallery.h tm">Gallery</a></li>
<li><a href="mailto:Ja *************** *******@yahoo.c om">Contact</a></li>
</ul>
</div>

It worked in IE but not Moz.
The above tested in IE6 and Firebird.
Then I added http://www.w3.org/TR/html4/loose.dtd to the DTD and it


New documents should be Strict...

If you want them to look like buttons (with CSS), holler. Others will
tell you about not using "mailto:" <g>

--
-bts
-This space intentionally left blank.
Jul 20 '05 #7
Beauregard T. Shagnasty replied to hisself:

[I tried to post this about 10 hours ago; seems to have gotten eaten.]


Egad. Now they show up, ~12 hours later, whereas normally they are
instantaneous. Sorry about that.

--
-bts
-This space intentionally left blank.
Jul 20 '05 #8
On Thu, 25 Sep 2003 05:50:13 GMT, Beauregard T. Shagnasty
<a.*********@ex ample.invalid> wrote:
Jane Withnolastname pounced upon this pigeonhole and pronounced:
I have a very simple navigation "menu" in the middle of my page. It is
three simple links and it lays out horizontally. To achieve this, I
used the following table:<snip table>

I can already hear you yelling "Don't use tables for layout!"


"Don't use tables for layout!"
Well,
that's why I'm here, because I cannot figure out how to achieve the
above "layout" without using a table.
I tried the following:

<snip try>

The CSS:
<style type="text/css">
#nav {
text-align: center;
}
#nav li {
display: inline;
list-style-type: none;
padding: 0 5% 0;
}
</style>

The HTML:

<div id="nav">
<ul>
<li><a href="#auctions ">Auctions</a></li>
<li><a href="gallery.h tm">Gallery</a></li>
<li><a href="mailto:Ja *************** *******@yahoo.c om">Contact</a></li>
</ul>
</div>

It worked in IE but not Moz.


The above tested in IE6 and Firebird.


Thanks. This almost worked exactly as I wanted, but refused to be
centered. Combined with one of the tutorials that kayodeok posted, I
added

#nav ul
{
margin: 0;
padding: 0;
list-style-type: none;
text-align: center;
}

to the style and it works perfectly in both browsers.
Then I added http://www.w3.org/TR/html4/loose.dtd to the DTD and it


New documents should be Strict...


This isn't a new document, it's a revision of an older one. Once I get
it working as a Transitional, I'll switch it over to Strict and start
all over again :)
Others will
tell you about not using "mailto:" <g>


OK, I'll bite: why not?
If it's about the spam-bots, I actually use
mailto: instead of mailto:
I just changed it for display purposes here.
If there's another reason, I'd like to hear (read) it....
Jul 20 '05 #9
On 25 Sep 2003 06:20:30 GMT, kayodeok <ne*********@bt openworld.com>
wrote:
Jane Withnolastname <Ja************ **********@yaho o.com> wrote in
news:p5******* *************** **********@4ax. com:
I have a very simple navigation "menu" in the middle of my page.
It is three simple links and it lays out horizontally. To
achieve this, I used the following table:

[snip HTML]

[snip CSS]

It worked in IE but not Moz.


Try these sites; they have tutorials on Horizontal Menus
(as well as vertical ones):

Listamatic: http://www.maxdesign.com.au/presentation/listamatic/
Listutorial: http://www.maxdesign.com.au/presentation/listutorial/
List-o-matic: http://www.accessify.com/tools-and-w...st-o-matic.asp
Taming Lists: http://www.alistapart.com/stories/taminglists/


Thanks. I only got as far as the second tutorial before I found out
what I needed to know. Needless to say, these have been added to my
bookmarks!
Jul 20 '05 #10

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

Similar topics

4
6590
by: Gaz | last post by:
Hi, I need to have a table nested within another table. The tables are alongside each other visually speaking, and the nested table (on the right) can vary in size. My problem is that when the nested table has more rows than the first table, the first table (on the left) pads out its rows so that the table matches the height of the nested table. I don't want this it happen.. I just want the nested table to be longer than the first...
61
24460
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will 'stretch'</td> <td valign="top" width="300">some data that won't 'stetch'</td> </tr> </table>
3
11363
by: Terrence Brannon | last post by:
I don't know what Postgres considers a relation and had no intention of creating one when piping my schema to it... I always DROP TABLE before CREATE TABLE, so here are the ERRORS emitted when building the database: 3:ERROR: table "country" does not exist 6:ERROR: table "customer" does not exist 11:ERROR: table "product" does not exist 15:ERROR: table "license" does not exist 19:ERROR: table "enduser" does not exist 24:ERROR: ...
4
15819
by: maricel | last post by:
I have the following base table structure - DDL: CREATE TABLE "ADMINISTRATOR"."T1" ( "C1" INTEGER NOT NULL ) IN "TEST_TS" ; ALTER TABLE "ADMINISTRATOR"."T1" ADD PRIMARY KEY
4
548
by: Simone Battagliero | last post by:
I wrote a program which inserts and finds elements in an hash table. Each element of the table is a dinamic list, which holds all elements having the same hash value (calculated by an int hashFunction(char *key, int elements) ), so the table is an array of dynamic lists. The version of the program I've attached to this message works fine; but it's the result of an accurate debugging. I discovered that my problems consisted in just 4 lines...
117
18494
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore for using DIV. There are other disadvantages to not using TABLE/TR/TD, such as the lack of ability...
76
271617
MMcCarthy
by: MMcCarthy | last post by:
Normalisation is the term used to describe how you break a file down into tables to create a database. There are 3 or 4 major steps involved known as 1NF (First Normal Form), 2NF (Second Normal Form), 3NF (Third Normal Form) and BCNF (Boyce-Codd Normal Form). There are others but they are rarely if ever used. A database is said to be Normalised if it is in 3NF (or ideally in BCNF). These steps are descibed as follows: Note: When attribute...
7
4811
by: Kamal | last post by:
Hello all, I have a very simple html table with collapsible rows and sorting capabilities. The collapsible row is hidden with css rule (display:none). When one clicks in the left of the expandable row, the hidden row is made visible with css. The problem is when i sort the rows, the hidden rows get sorted as well which i don't want and want to be moved (while sorting) relative to their parent rows. The following is my complete html code...
5
3838
by: wugon.net | last post by:
question: db2 LUW V8 UNION ALL with table function month() have bad query performance Env: db2 LUW V8 + FP14 Problem : We have history data from 2005/01/01 ~ 2007/05/xx in single big table, we try separate this big table into twelve tables and create a view
5
4932
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums there are, it crashes. There are currently 6 columns, and I only want 4. How do I remove the last two (discount and date)? Here is a link: http://www.jaredmoore.com/tablesorter/docs/salestable.html Here is some jquery js that I think...
0
8345
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8789
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8570
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7293
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5603
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4279
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2694
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1904
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1584
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.