Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

TABLE question.

  • 22-11-2001 4:28pm
    #1
    Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭


    I'm trying to make a table with each 1st cell of each row would be a different size.

    Is this even possible?

    something like...
    <TABLE WIDTH=50%>
    <TR><TD WIDTH=40% BGCOLOR=RED></TD></TR>
    <TR><TD WIDTH=20% BGCOLOR=Blue></TD></TR>
    </TABLE>
    

    But the cells come out the same size. What am I missing?


Comments

  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    You only actually need to specify the widths of table cells in the first row, all other rows will have to follow. That's why you're seeing them both as the same size.

    You could try using the colspan attribute in the TD but it might get ugly. What are you trying to do?
    If it's a graph, use images with relative width attributes.
    In fact even if it's not a graph, you could use an image to do you're coloring, or use nested tables in your td to get the desired effect. It would be ugly mind.


  • Closed Accounts Posts: 512 ✭✭✭beaver


    Not possible. They work like columns and have to be the same size.

    Best way is like Enygma said, use nested tables...
    <TABLE>
    
    <TR>
    <td><TABLE>
    <TR>
    <td width='10%'>blah</td>
    </TR>
    </TABLE></td>
    </TR>
    
    <TR>
    <td><TABLE>
    <TR>
    <td width='20%'>yakkity yak</td>
    </TR>
    </TABLE></td>
    </TR>
    
    </TABLE>
    

    This way you're only dealing with one large cell in each row of the original table.


  • Registered Users, Registered Users 2 Posts: 21,264 ✭✭✭✭Hobbes


    Actually I did this. :)
    <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0>
    <!--- Sets the scale --->
    <TR><TD COLSPAN=1></TD><TD COLSPAN=1 BGCOLOR=White></TD></TR>
    
    <TR><TD COLSPAN=5><FONT SIZE=1>Item 1</FONT></TD>
    <TD COLSPAN=10 BGCOLOR=Green></TD></TR>
    
    <TR><TD COLSPAN=5><FONT SIZE=1>Item 2</FONT></TD>
    <TD COLSPAN=15 BGCOLOR=Red></TD></TR>
    
    <TR><TD COLSPAN=5><FONT SIZE=1>Item 3</FONT></TD>
    <TD COLSPAN=25 BGCOLOR=Blue></TD></TR>
    </TABLE>
    

    Doesn't work in everything but it renders fine in what I wanted. :)


Advertisement