Table conversion problem

This is a discussion on "Table conversion problem" within the Web Page Design section. This forum, and the thread "Table conversion problem 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 Jul 26th, 2006, 13:10
Junior Member
Join Date: Jul 2006
Location: Nottingham, UK
Age: 37
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dartiss Send a message via Skype™ to dartiss
Question Table conversion problem

Hi,

I'm attempting to replace tables in my site (bmtg.org.uk) with CSS.

Most of this I've worked out how to do, with the exception of the menu at the top of the screen (take a look at http://www.bmtg.org.uk/index.php as an example).

I thought that converting the table to a DIV and the menu elements within to SPANs would work, but the block-style anchor tags are causing display problems.

Any thoughts on the best way to convert this?

David.
Reply With Quote

  #2 (permalink)  
Old Jul 26th, 2006, 13:42
Junior Member
Join Date: Jul 2006
Location: Nottingham, UK
Age: 37
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dartiss Send a message via Skype™ to dartiss
Re: Table conversion problem

Ok. Worked it out now - the clue was in my own question

The block anchor tag was the fault.

Anyway, quick question - if you display two items, each within a SPAN tag, they appear with a gap between them. Is there anyway of getting rid of this gap?

David.
Reply With Quote
  #3 (permalink)  
Old Jul 26th, 2006, 13:58
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Table conversion problem

span.foo { margin:0; padding:0;}

<span class="foo">Foo Foo Foo</span>

Or something. I need coffee.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #4 (permalink)  
Old Jul 26th, 2006, 14:00
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Table conversion problem

Or if the spans are in another div you could do #foo span {} and have it automatically apply to every <span> element contained within #foo without having to add a class or id to each span.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #5 (permalink)  
Old Jul 26th, 2006, 14:20
Junior Member
Join Date: Jul 2006
Location: Nottingham, UK
Age: 37
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dartiss Send a message via Skype™ to dartiss
Re: Table conversion problem

Ok, here's a simple example of what I mean:

HTML: Select all
<a href="#">Test 1</a>
<a href="#">Test 2</a>
This will display the two pieces of text, one after another, but with a gap between them. Because of this gap, when the anchor changes the background colour, it's not doing it for entire box, which I've drawn a border around.

David.
Reply With Quote
  #6 (permalink)  
Old Jul 26th, 2006, 14:23
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Table conversion problem

<a href="#">Test 1</a><a href="#">Test 2</a>

remove the space.
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #7 (permalink)  
Old Jul 26th, 2006, 14:39
Junior Member
Join Date: Jul 2006
Location: Nottingham, UK
Age: 37
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dartiss Send a message via Skype™ to dartiss
Re: Table conversion problem

Ok that was my fault in the cut and paste procedure. Yes I put a space, by accident, between the tags.

Okay, ignore that space and you will still get a gap between the words "Test 1" and "Test 2". This is the gap I'm trying to illiminate.

David.
Reply With Quote
  #8 (permalink)  
Old Jul 26th, 2006, 14:43
moojoo's Avatar
Moderator
Join Date: Aug 2005
Location: Texas
Age: 31
Posts: 1,761
Blog Entries: 1
Thanks: 0
Thanked 18 Times in 18 Posts
Send a message via AIM to moojoo Send a message via MSN to moojoo Send a message via Yahoo to moojoo
Re: Table conversion problem

When I just put <a href="#">Test 1</a><a href="#">Test 2</a> in the HTML it has no gap in IE or FF. Not sure what to tell you. Can you show me the complete source?
Last Blog Entry: Apps every Mac based web dev should consider (Jul 10th, 2008)
Reply With Quote
  #9 (permalink)  
Old Jul 26th, 2006, 14:48
Junior Member
Join Date: Jul 2006
Location: Nottingham, UK
Age: 37
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dartiss Send a message via Skype™ to dartiss
Re: Table conversion problem

HTML: Select all
<html>
<head>
<style type="text/css">
A    {color: #ffffff; background-color: #000000;}
A:Hover {color: #000000; background-color: #ffffff;}
</style>
</head>

<body>
<a href="#">Test 1</a>
<a href="#">Test 2</a>

</body></html>
Running this should produce two links, with a white font and black background. Between them is a space - evident because of the gap in the black backgrounds. It's this space I'm trying to get rid of.

David.
Reply With Quote
  #10 (permalink)  
Old Jul 26th, 2006, 17:42
Junior Member
Join Date: Jul 2006
Location: Nottingham, UK
Age: 37
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dartiss Send a message via Skype™ to dartiss
Re: Table conversion problem

I don't think I've explained this very well so I've knocked something up to do it a bit better. Everything is in-line, so the source is easy to follow (although it is a quick knock-up, so don't expect it to run through a validator first time ).

It can be found here:

http://www.bmtg.org.uk/test.html

Any assistance with this will be appreciated.

David.
Reply With Quote
Reply

Tags
table, conversion, problem

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
Iframe / Table Problem.... help me!!! bigbluesky2006 Web Page Design 4 Dec 16th, 2006 10:59
Table Problem? ivan Web Page Design 8 Mar 1st, 2006 09:31
Table sizing problem Jaken Veina Web Page Design 1 Jan 6th, 2006 22:06
CSS and Table problem lisnalinchy Web Page Design 10 Aug 3rd, 2005 09:54
Expandable Table Problem legomaniac Web Page Design 3 Jul 15th, 2005 14:16


All times are GMT. The time now is 07:30.


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