Jump to content


Table Problems


3 replies to this topic

#1 Devilman

    Young Padawan

  • Members
  • Pip
  • 24 posts

Posted 05 October 2006 - 03:06 PM

The way I want my tutorials page to look is really annoying me I can't get the same looks with CSS as I can with the table, I just can't work it out. How would I turn this to CSS:

<table width="80%" cellpadding="0" cellspacing="1" align="center" bgcolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFFF" width="10%">
Tutorial image Here</td>
<td bgcolor="#EEEEEE" style="border: 1px solid #000000;" width="90%">
Description Here</td>
</tr>
<tr>
<td bgcolor="#FFFFFF" width="10%">
Tutorial Image Here</td>
<td bgcolor="#6C9A26" style="border: 1px solid #000000;" width="90%">
Description Here</td>
</tr>
</table>
As you can see from that the descriptions take an alternate colour change so one tutorials description will be green the other gray.

#2 rc69

    PHP Master PD

  • P2L Staff
  • PipPipPipPip
  • 3,827 posts
  • Gender:Male
  • Location:Here
  • Interests:Web Development

Posted 06 October 2006 - 03:55 PM

You could probably put the image in a div, float it to the left, put the description in another div, and put both of them in a container div that has a clear:left; attribute to keep things even.

As i don't remember how well that worked for me, i won't guarantee it, but i can say that an effect like the above is hard to achieve with CSS, even when you know what you're doing.

#3 Devilman

    Young Padawan

  • Members
  • Pip
  • 24 posts

Posted 06 October 2006 - 06:45 PM

Yeah when I try to do it I get weird results it's very unfair lol.

Is there a way thats valid without using CSS?

Edited by Devilman, 06 October 2006 - 06:45 PM.


#4 Devilman

    Young Padawan

  • Members
  • Pip
  • 24 posts

Posted 09 October 2006 - 10:27 AM

I managed to get passed it on my XHTML transitional document by putting all of the tables styles into a css sheet and simply doing like
<td class="td1">
etc and it passes the transitional validation however to make my dropdown menu work in IE I have to put
	behavior: url(csshover.htc);
in the body part of my CSS however behavior isn't valid CSS how would I do that?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users