• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 145
  • Last Modified:

Please view my page

Hi,

I have got some trouble with the HTML of my navigation bar, and would
appreciate some help. The address is:
http://nl.internations.net/wimkerk/bar.html

Thanks in advance
0
wimkerk
Asked:
wimkerk
1 Solution
 
paulkdCommented:
You need to close your <h5> tagss, however, the remove the width=100% from the <table> tag just after the <!-- second cell and you will get the third changing to 130.
0
 
wimkerkAuthor Commented:
Hi paulkd,

I didn't close the <h5> tags because otherwise browsers will add extra space (one row).

When I remove the width as you suggested the three cells become the SAME size, about 200 pixels wide. And there is a big gap between the
second and last cell.
0
 
davlun20080Commented:
Try this:

<table width="100%" border="0" cellpadding="1" cellspacing="0" bgcolor="#A82828">
    <tr>
      <td width="130" bgcolor="#FFFFFF"><img src="transparent.gif" width="130" height="1"></td>
      <td bgcolor="#FFFFFF" width="4"><img src="transparent.gif" width="6" height="1"></td>
      <td bgcolor="#FFFFFF"><img src="transparent.gif" width="130" height="1"></td>
      <td width="4" bgcolor="#FFFFFF"><img src="transparent.gif" width="6" height="1"></td>
      <td width="130" bgcolor="#FFFFFF"><img src="transparent.gif" width="130" height="1"></td>
    </tr>
    <tr>
      <td width="130" align=center><font size=-1 color=white>First Cell</font></td>
      <td bgcolor="#FFFFFF" width="4"><img src="transparent.gif" width="6" height="8"></td>
      <td>
        <table width="100%" border="0" cellpadding="0" cellspacing="0" vspace="1" hspace="1">
          <tr valign="middle">
            <td bgcolor="lightyellow" align="left"> &nbsp; <a href="about.html" style="font-size: 16pt">About</a>
              | <a href="help.html" style="font-size: 16pt">Help</a> | <a href="info.html" style="font-size: 16pt">Info</a>
            </td>
            <td bgcolor="lightyellow" valign="middle" align="right"> <a href="members.html" style="font-size: 16pt">Page</a>&nbsp;
            </td>
          </tr>
        </table>
      </td>
      <td align=center bgcolor="#FFFFFF" width="4"><img src="transparent.gif" width="6" height="8"></td>
      <td width="130" align=center><font size=-1 color=white>Third</font></td>
    </tr>
  </table>

To test this, create a clear 1x1 pixel gif and place it in your web folder.  Adjust the path in the code above to point to the clear image.  The clear image is used to hold space to keep the cells sized consistently, the hspace and vspace property on the table create the border around the center table.  I would also recommend you use style sheets for your site, you can then adjust for each browser and platform if you need to.

Let me know if you want any design changes.

davlun
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
CJ_SCommented:
Do this:

<table width=100% cellpadding=1 cellspacing=0 border=0>
<tr>

<!-- First Cell -->

<td bgcolor="brown" width="130" valign=top>

<table width="130" border="0" cellpadding="0" cellspacing="0">
<tr><td bgcolor="brown" align="center">

<font size=-1 color=white>First Cell</font></td>
</tr></table>
</td>

<!-- Space (yes I know this is also a cell :) -->

<td width=10><font color="#ffffff" face="Arial,Helvetica" size="-2">&nbsp;</td>


<!-- Second Cell -->
<td bgcolor="brown" width="100%" valign=top>

<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td bgcolor="lightyellow" align="left">

<h5>&nbsp; <a href="about.html">About</a> | <a href="help.html">Help</a> | <a href="info.html">Info</a> </td>
<td bgcolor="lightyellow" align="right"><h5><a href="members.html">Page</a>&nbsp; </font>
</td></tr></table>
 
<!-- Space -->                        

<td width=130 bgcolor=#ffffff><h5>&nbsp;</td>

<!-- Thirth Cell -->

<td width=130 bgcolor=brown>
<table width="130" border="0" cellpadding="0" cellspacing="0">
<tr><td bgcolor="brown" align="center">

<font size=-1 color=white>Third</font></td>
</tr></table>
</td></tr></table>
0
 
fibdevCommented:
try this in the third cell:

<td width=130 bgcolor=brown nowrap><font size=-1 color=white>Third</font></td></tr></table>
0
 
wimkerkAuthor Commented:
Sorry davlun200800 but your solution results in a very large bar, with extra rows of space.

Thanks CJ_S you where the first to solve the problem, so the points are yours. But fibdev's (even easier) solution solves my problem as well. I have posted a "For fibdev".

Thanks again
0
 
davlun20080Commented:
wimkerk,
Not sure what you mean, I tested in both IE and NS, resulted in a single bar across the top of the page, with the center table and colomn expanding to fill the entire width of the browser.

Just out of curiosity, did you make any changes (ie addition of words or layout)?  If not what platform are you working on so I can test further for my own knowledge.  Do you by chance reinsert the H5 tags?

davlun
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now