The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Table editing in HTML are making me crazy, Making a 2 cols tabel 25%+75% in width
HTMLNOVICE
post Apr 15 2009, 05:59 AM
Post #1





Group: Members
Posts: 3
Joined: 15-April 09
Member No.: 8,326



[font=Times New Roman] unsure.gif I've tried to make a table with some attributes and I fail all the time.
I want a table with 2 columns where the first col should be 25 % in width and the other one with 75% in width with cells with flexible height in both.
Furthermore there should be different bgcolors in the 2 cols and a colored border between these ones.
The fontcolor should be different in the 2 cols and even the font size.
The text should be centered.
Tell me if I'm too bold when asking for help editing a HTML code according to my wishes.[u][b][color=#CC0000] ohmy.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 15 2009, 08:43 AM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



No, not at all. Ask all you want. smile.gif

Can you show us what you have so far though? It's hard to say what's wrong without seeing your HTML.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HTMLNOVICE
post Apr 15 2009, 10:00 AM
Post #3





Group: Members
Posts: 3
Joined: 15-April 09
Member No.: 8,326



QUOTE(pandy @ Apr 15 2009, 03:43 PM) *

No, not at all. Ask all you want. smile.gif

Can you show us what you have so far though? It's hard to say what's wring without seeing your HTML.


I thank you for your interest.
This is my results so far



<TABLE BORDER=1>
<CAPTION>bordercolor="#99ff99" style="background-color:#ffffff" Global gambling makes millionaires - You in turn?!--A headline for all tablecols..></CAPTION>

<TR><TH ROWSPAN=2><TH COLSPAN=2> <!--RADBREDD & KOLUMNBREDD>

<TH ROWSPAN=2>

<TR><TH>height<TH>weight

<TR><TH ALIGN=LEFT>ROWSPAN=2> cellpadding="3" cellspacing="3" width="25%" <FONT face=times new roman <B><I>Learn how to become a millionaire<!--TEXT..>
<TR><TH ALIGN=RIGHT>ROWSPAN=2><FONT face=times new roman <B><I>To The Real Heat</I></B></FONT face></td> <!-- Average ..>egen text</td>!--TEXT..>
<tr>
<td>my own text></td>
<td>banners>/td>


<tr>

</TABLE>
</HTML>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 15 2009, 10:19 AM
Post #4


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



That's still only one table. Where's the nested one?

You have some errors. You've sprinkled attributes outside tags here and there. wink.gif

HTML
<TABLE BORDER=1>
<CAPTION>bordercolor="#99ff99" style="background-color:#ffffff" Global gambling makes millionaires - You in turn?!--A headline for all tablecols..></CAPTION>


'bordercolor' and 'style' should be in the starting TABLE tag. Now they are the content of CAPTION and will show on the page. Furthermore, bordercolor is a proprietary IE extension and shouldn't be used. You should use CSS instead. You so said you aren't allowed to use CSS, yet you do. What you have as the value of the style attribute is very much CSS. So a little more wouldn't hurt, no?

HTML
<TABLE BORDER=1 style="background-color:#ffffff"><!-- The TABLE tag ends here and its attributes must be inside it -->
<CAPTION>Global gambling makes millionaires - You in turn?!--A headline for all tablecols..></CAPTION>


You have the same type of error in several places, attributes outside the tag they are meant to be in. The closing tags for TD and TH are optional in HTML, but I recommend you use them anyway. It's said to help browsers and it makes the markup more readable.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Apr 15 2009, 12:48 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



I'm so sorry! I got this thread confused with another one about nested tables. What I said about the errors still goes though, but forget the rest. blush.gif

I'm a little confused though. You said you wanted two columns, but the table you shows seems to have more than two (if mended). For a 2-column table you basically only need this.

HTML
<table border="2" width="100%">
<tr>
<td width="25%">Yadda yadda</td>
<td width="75%">Yadda yadda</td>
</tr>
</table>


You don't need to use a width in the table tag. Depends on if you want the table to stretch out even if it has just a little content.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
HTMLNOVICE
post Apr 19 2009, 10:10 AM
Post #6





Group: Members
Posts: 3
Joined: 15-April 09
Member No.: 8,326



Thanks once again Pandy.

HTML NOVICE biggrin.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 29th March 2024 - 03:17 AM