/    Sign up×
Community /Pin to ProfileBookmark

Removing my overuse of tables.

Hi

I am relatively new to HTML and I would appreciate some advice…

I have created a new top nav bar (the grey buttons – ignore the socks one, I’m going to change that tommorow) for [url]www.kjbeckett.com[/url] however each button has spacing between them which I dont want.

Based on my reading I think I simply have to remove the <th scope=”col”></th> that wraps around each link. This would reduce the spacing between each buttton so that each image touches the one next to it.

e.g.

[QUOTE]

<table width=”100%” align=”” border=”0″ cellpadding=”0″>
<tr>
<th scope=”col”><a href=”http://www.kjbeckett.com/acatalog/mensbelts.html”><img src=”http://www.kjbeckett.com/acatalog/topbut-belts.gif” alt=”Belts” name=”topnavbelts” width=”73″ height=”18″ border=”0″ id=”topnavbelts”></a></th>
<th scope=”col”><a href=”http://www.kjbeckett.com/acatalog/cufflinks.html”><img src=”http://www.kjbeckett.com/acatalog/topbut-cufflinks.gif” alt=”Cufflinks” name=”topnavcufflinks” width=”73″ height=”18″ border=”0″ id=”topnavcufflinks”></a></th>

[/QUOTE]

would become:

[QUOTE]

<table width=”100%” align=”” border=”0″ cellpadding=”0″>
<tr>
<a href=”http://www.kjbeckett.com/acatalog/mensbelts.html”><img src=”http://www.kjbeckett.com/acatalog/topbut-belts.gif” alt=”Belts” name=”topnavbelts” width=”73″ height=”18″ border=”0″ id=”topnavbelts”>
<a href=”http://www.kjbeckett.com/acatalog/cufflinks.html”><img src=”http://www.kjbeckett.com/acatalog/topbut-cufflinks.gif” alt=”Cufflinks” name=”topnavcufflinks” width=”73″ height=”18″ border=”0″ id=”topnavcufflinks”></a>

[/QUOTE]

Is this theory correct? Is there anything I should replace the <th> tags with to ensure the page is built correctly?

Paul

to post a comment
HTML

5 Comments(s)

Copy linkTweet thisAlerts:
@kjbeckettauthorSep 24.2007 — I should add...

I wasn't sure if it was essential to use anything like:

<ul id="">

<li style=""> or <li id="">[/QUOTE]


when all I want to have is some static button/images/links at the top of the page?

Paul
Copy linkTweet thisAlerts:
@kiwibritSep 24.2007 — How I have done horizontal navbars across the top of the page - the colours and padding are from a specific site - change to taste:

CSS
<i>
</i>ul#navbar {
padding: 0;
margin: 0;
color: #fff;
float: left;
width: 100%;
}
ul#navbar li { display: inline; }
ul#navbar li a {
padding:.25em;
background-color: #1F187E;
color: #fff;
text-decoration: none;
float: left;
border-bottom: solid .1em #fff;
border-top: solid .1em #fff;
border-left: solid .1em #fff;
border-right: solid .1em #fff;
}
ul#navbar a:link, ul#navbar a:visited { color: #fff; }
ul#navbar a:focus, ul#navbar a:active, ul#navbar li a:hover {
color: #000;
background-color: #FF6;
}


Addtitional CSS for IE, invoked by conditional statement

<i>
</i>#navbar a:active {
color:#0000FF;
background-color: #FFFF66;
}


HTML

[code=html]
<div>
<ul id="navbar">
<li><a href="index.htm">Home page</a></li>
<li><a href="Thing-1.htm">Thing 1</a></li>
<li><a href="Thing-2.htm">Thing 2</a></li>
</ul>
</div>
[/code]
Copy linkTweet thisAlerts:
@WebJoelSep 24.2007 — ....<th [B]scope="col"[/B]>....[/QUOTE] I am not familiar with this... -what is it for? ?
Copy linkTweet thisAlerts:
@kiwibritSep 25.2007 — I am not familiar with this... -what is it for? ?[/QUOTE]

[url=http://www.w3.org/TR/html401/struct/tables.html#adef-scope]The W3C definition[/url]. A [url=http://www.accessifyforum.com/viewtopic.php?t=8999&start=0]discussion on tthe use of th scope[/url].
×

Success!

Help @kjbeckett spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...