You are viewing our Forum Archives. To view or take place in current topics click here.
HTML code help (Navigation Bar)
Posted:

HTML code help (Navigation Bar)Posted:

lachlanp16
  • New Member
Status: Offline
Joined: Dec 26, 201310Year Member
Posts: 20
Reputation Power: 0
Status: Offline
Joined: Dec 26, 201310Year Member
Posts: 20
Reputation Power: 0
This nav bar that I have is stuck on the left hand side and I am wanting it to be moved more to the right. How can I tried everything I know but my knowledge of html isn't the greatest.

<tr>
  <td>
  <table width="875" align="center" cellpadding="0" cellspacing="0">
<font face="arial" size="3" color="#FFFFFF">
   <a href="index.html">Home</a>  <a href="faq.html">FAQ</a>  <a href="contact.html">Contact</a> 
 </font>
   </tr>
     </td>
       </table>



Thank You
#2. Posted:
Nic
  • Retired Staff
Status: Offline
Joined: Jun 08, 201014Year Member
Posts: 2,466
Reputation Power: 1070
Motto: I've been watching you all day.
Motto: I've been watching you all day.
Status: Offline
Joined: Jun 08, 201014Year Member
Posts: 2,466
Reputation Power: 1070
Motto: I've been watching you all day.
It's hard for me to tell what you want to do here, considering your HTML is quite a mess. Here is something that might help you out, it shows how to create basic tables:

[ Register or Signin to view external links. ]
#3. Posted:
7en
  • Wise One
Status: Offline
Joined: Aug 16, 201212Year Member
Posts: 598
Reputation Power: 29
Status: Offline
Joined: Aug 16, 201212Year Member
Posts: 598
Reputation Power: 29
Nicasus wrote It's hard for me to tell what you want to do here, considering your HTML is quite a mess. Here is something that might help you out, it shows how to create basic tables:

[ Register or Signin to view external links. ]


..Or you could do it the proper way and never ever ever use tables for page layout.

[ Register or Signin to view external links. ]
#4. Posted:
OpenInkz
  • Ladder Climber
Status: Offline
Joined: Mar 23, 201212Year Member
Posts: 337
Reputation Power: 16
Status: Offline
Joined: Mar 23, 201212Year Member
Posts: 337
Reputation Power: 16
lachlanp16 wrote This nav bar that I have is stuck on the left hand side and I am wanting it to be moved more to the right. How can I tried everything I know but my knowledge of html isn't the greatest.

<tr>
  <td>
  <table width="875" align="center" cellpadding="0" cellspacing="0">
<font face="arial" size="3" color="#FFFFFF">
   <a href="index.html">Home</a>  <a href="faq.html">FAQ</a>  <a href="contact.html">Contact</a> 
 </font>
   </tr>
     </td>
       </table>



Thank You



lol, align="right"........................ lolololo
#5. Posted:
var
  • TTG Senior
Status: Offline
Joined: Dec 24, 201211Year Member
Posts: 1,498
Reputation Power: 79
Status: Offline
Joined: Dec 24, 201211Year Member
Posts: 1,498
Reputation Power: 79
OpenInkz wrote
lachlanp16 wrote This nav bar that I have is stuck on the left hand side and I am wanting it to be moved more to the right. How can I tried everything I know but my knowledge of html isn't the greatest.

<tr>
  <td>
  <table width="875" align="center" cellpadding="0" cellspacing="0">
<font face="arial" size="3" color="#FFFFFF">
   <a href="index.html">Home</a>  <a href="faq.html">FAQ</a>  <a href="contact.html">Contact</a> 
 </font>
   </tr>
     </td>
       </table>



Thank You



lol, align="right"........................ lolololo


It's more conventinal to use an unordered list for a navigation bar, making each individual list item a link.

Also, can use margins to align the entire ul, centering it on the page with right, and left.


Last edited by var ; edited 2 times in total
#6. Posted:
phpBB
  • TTG Senior
Status: Offline
Joined: Dec 31, 201112Year Member
Posts: 1,274
Reputation Power: 54
Status: Offline
Joined: Dec 31, 201112Year Member
Posts: 1,274
Reputation Power: 54
<tr>
  <td>
  <table class="menu" width="875" align="center" cellpadding="0" cellspacing="0">
<font face="arial" size="3" color="#FFFFFF">
   <a href="index.html">Home</a>  <a href="faq.html">FAQ</a>  <a href="contact.html">Contact</a> 
 </font>
   </tr>
     </td>
       </table>

<style>
.menu{position:absolute;left:250px;}
</style>


change the (left) element of the menu, until it is to the position you want.

ALSO: I suggest using <li> and <ul> instead of tables
#7. Posted:
lachlanp16
  • New Member
Status: Offline
Joined: Dec 26, 201310Year Member
Posts: 20
Reputation Power: 0
Status: Offline
Joined: Dec 26, 201310Year Member
Posts: 20
Reputation Power: 0
no matter what I do my menu bar is still stuck to the side of the page.
[ Register or Signin to view external links. ]

This is the code I have


<html>
<head>
   <title>
      Directflix-Home
   </title>
   <link rel="stylesheet" href="style.css" type="text/css" />


</head>
<body>
     

        <div id="header">
      <img src="banner.png" width="500px" height="120px" />

   </div>
<tr>
  <td>
  <table class="menu" width="875" align="right" cellpadding="5" cellspacing="0">
<font face="arial" size="3" color="#FFFFFF">
   <a href="index.html">Home</a>  <a href="faq.html">FAQ</a>  <a href="contact.html">Contact</a> 
 </font>
   </tr>
     </td>
       </table>

<style>
.menu{position:absolute;right:50px;}
</style>
</body>
#8. Posted:
iyop45
  • Prospect
Status: Offline
Joined: Apr 15, 201113Year Member
Posts: 614
Reputation Power: 83
Status: Offline
Joined: Apr 15, 201113Year Member
Posts: 614
Reputation Power: 83
lachlanp16 wrote no matter what I do my menu bar is still stuck to the side of the page.
[ Register or Signin to view external links. ]

This is the code I have


<html>
<head>
   <title>
      Directflix-Home
   </title>
   <link rel="stylesheet" href="style.css" type="text/css" />


</head>
<body>
     

        <div id="header">
      <img src="banner.png" width="500px" height="120px" />

   </div>
<tr>
  <td>
  <table class="menu" width="875" align="right" cellpadding="5" cellspacing="0">
<font face="arial" size="3" color="#FFFFFF">
   <a href="index.html">Home</a>  <a href="faq.html">FAQ</a>  <a href="contact.html">Contact</a> 
 </font>
   </tr>
     </td>
       </table>

<style>
.menu{position:absolute;right:50px;}
</style>
</body>

Don't use absolute positioning!!!

You should have a div wrapper around your image and nav bar and using margins and fixed widths to center within the page.


#wrapper{
    width:900px;
    margin:0 auto;
}


Whoever is giving you this advice to use tables or even consider using absolute positioning for relative content is wrong and has no idea what they're talking about.
#9. Posted:
-Pawn
  • TTG Addict
Status: Offline
Joined: Jan 15, 201113Year Member
Posts: 2,316
Reputation Power: 119
Status: Offline
Joined: Jan 15, 201113Year Member
Posts: 2,316
Reputation Power: 119
Abbreviate wrote
Nicasus wrote It's hard for me to tell what you want to do here, considering your HTML is quite a mess. Here is something that might help you out, it shows how to create basic tables:

[ Register or Signin to view external links. ]


..Or you could do it the proper way and never ever ever use tables for page layout.

[ Register or Signin to view external links. ]


Well define "Proper way?" Some people have a different idea of what's proper or not. Tables, in my experience, are absolutely great for navigation bars. But again, it comes down to personal opinion on that matter.
#10. Posted:
7en
  • V5 Launch
Status: Offline
Joined: Aug 16, 201212Year Member
Posts: 598
Reputation Power: 29
Status: Offline
Joined: Aug 16, 201212Year Member
Posts: 598
Reputation Power: 29
-K9 wrote
Abbreviate wrote
Nicasus wrote It's hard for me to tell what you want to do here, considering your HTML is quite a mess. Here is something that might help you out, it shows how to create basic tables:

[ Register or Signin to view external links. ]


..Or you could do it the proper way and never ever ever use tables for page layout.

[ Register or Signin to view external links. ]


Well define "Proper way?" Some people have a different idea of what's proper or not. Tables, in my experience, are absolutely great for navigation bars. But again, it comes down to personal opinion on that matter.


"In your experience"? You have no experience. Obviously.
Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.