93 users online (0 members and 93 guests)  


  Results 1 to 5 of 5

Related

  1. Replies: 0
  2. Replies: 2
  3. create a table along the width of the sheet    Forum: General Discussion
    Replies: 1
  4. Width of rows in table.    Forum: CSS Forum
    Replies: 1
  1. #1
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    table with exact width problem...

    ok, i am making a neat little mod for YaBB so the users can rate posts, much like VBulliten. anyway, the users are going to beable to rate the posts good or bad, and if the admin has "show bad ratings" turned on, then i want to show the red bar.

    well, i am not expecting many people to get bad ratings, but i am sure it will happen some times. the equation is not finished yet, but 1px will be equal to however many points the admin sets (probably around 5) (good or bad). when i try and make a <td> with 2px i get a 4px <td> and when i try and make a 1px cell i get a 3px <td>.

    i have tried changing cellpading to 0 and tried border to 0 and still no luck

    any luck would be greatly appreciated,
    -ALL

  2. #2
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Re: table with exact width problem...

    can you post a link to what you have.

    Dave

  3. #3
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: table with exact width problem...

    the rating bar will look somthing like this:
    http://tkforums.com/testfiles/cellproblem.html

    but i cannot actually show you the real thing, because it is on my localhost (apache client) untill i finish it.

    Here is the code anyway:
    Code:
    <head>
    <link rel="stylesheet" href="http://www.tkforums.com/testfiles/default.css" type="text/css" />
    
    </head>
    <body>
    <table cellpadding="4" cellspacing="0" border="0" width="95%" align="center" style="table-layout: fixed;" bgcolor="#808080">
    		<table width="100" align="center" class="ratingtable">
    			<td title="22" width="22" height="10" class="ratingcellgood"><td title="2" class="ratingcellbad" width="2"></td><td></td>
    		</table>
    </table>
    </body>
    PS: i may not keep it like that, i may make 2 different cells rather than keep them together, but probably keep them together. (it will use an equation, so when they get lets say 1000 points and they have 25 bad points, they may only end up with one pixle red, but if another user has 200 good points and 25 bad points their red pixles will be much higher
    Last edited by ALL; 05-25-2005 at 10:43 PM.

  4. #4
    HTML's Avatar
    Administrator

    Status
    Offline
    Join Date
    Aug 2000
    Posts
    3,445

    Follow HTML On Twitter Add HTML on Facebook Add HTML on Google+ Add HTML on Linkedin Visit HTML's Youtube Channel

    Re: table with exact width problem...

    The table code is quite jumbled.

    1 - you have no row tags
    2- you cannot open a new td with out first closing the currently open td
    3 - to embed a table it must be embedded in a td and not within just a table tag.
    4 - you have an extra closing /td tag


    basically your code is this
    table
    table
    td
    td
    /td
    /td
    /td
    /table
    /table

    a basic table should be like this
    table
    tr
    td
    content or embedded table
    /td
    /tr
    /table


    of course this may not solve the issue but correcting these issues will help us determine what else needs to be done.

    Dave

  5. #5
    ALL's Avatar
    Super Dooper Nerd

    Status
    Offline
    Join Date
    Feb 2005
    Location
    localhost
    Posts
    382

    Re: table with exact width problem...

    thanks for the tips dave, that is not actually how it will look, i edited just that out of the whole page, and i must have taken one of the </td>'s out.

    anyway, i found the problem, it wasnt a HTML problem, but a CSS problem, when i tried turning "cellpadding" to 0, i must have misspelled it.

    here was my solution:
    Code:
    <table width="100" cellpadding="0">



Tags for this Thread