How do I make a table transparent?

They have: 344 posts

Joined: Jun 2002

Hi guys!

I have fixed my Coranto and I want to make, the table in which you see the news items transparent so that an image behind it can be seen. What is the "HTML" code for this?

Thanks guys!

They have: 344 posts

Joined: Jun 2002

oops! I forgot to give a link! Sad Shocked

http://www.cmdirector.neosurge.net/index.php

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

If you want the tables to not have backgrounds, don't set them. You have tables and cells with bgcolor set.

They have: 344 posts

Joined: Jun 2002

I got rid of the bit which you were talking about, I think but it is still the same. I want to keep the grey and the border around the outside.

This is the code:

<table border="0.5" bgcolor="#000000" width="395">
<tr><td bgcolor="#ffffff">
<div style="background-color: #efefef"> <p><strong><Field: Subject></strong><br>
- Posted by <a href="mailto:<Field: UserField_Email>"><Field: User></a> on <Field: Date><br></div>
<Field: Text></p>
</tr></td>
</table></table> <br>
'

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

table is black
table cell is white
div is grey

?! What do you want to have happen, exactly?

They have: 344 posts

Joined: Jun 2002

I want the Header of the news to have a grey background, with a black border and for the table where the news is posted to be transparent so that I can see an image in it with the text on top of it

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

That's not going to be possible if you use a table to create a border. Nested tables to create borders isn't a good approach anymore as there are better ways (CSS).

Set the table border in CSS, and remove the nested table, then you should have what you want.

table#thisone {
    border: 2px solid black;
}

.newsheader {
    background-color: #efefef;
}
'

HTML

<table id="thisone" width="395">
    <tr>
        <td>
        <span class="newsheader"><strong><Field: Subject></strong><br>
- Posted by <a href="mailto:<Field: UserField_Email>">
<Field: User></a> on <Field: Date></span>

        <p><Field: Text></p>
        </td>
    </tr>
</table>
'

They have: 344 posts

Joined: Jun 2002

I save the file as thisone.css?

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

no no no no... just put that CSS bit in your CSS file. And for pete's sake, please tell me that you know that when I say "thisone" I mean "whatever you choose to call it", right?

They have: 344 posts

Joined: Jun 2002

Yeah yeah! Of course I know that I can change the name! Well it is working now! Thanks for your help Suzanne!Smiling

Suzanne's picture

She has: 5,507 posts

Joined: Feb 2000

Good! Glad to see you're getting this all straight! Smiling

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.