1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

fitting Ul tags in Table tags ?

Discussion in 'CSS' started by co.ador, Jul 27, 2009.

  1. #1
    help on this guys


    instead of this
    <table>
    <td rowspan="4"></td> 
    <td height="49"><strong>Rating and Review:</strong></td><td align="center"><a href="#">Add Review</a></td>
    <tr>
      <td rowspan="1" height="4" ><table style="font-size:10; position:relative; 
    left:26px;">
    <td width="58">five star</td>
      <td width="40">*****</td>
      <td width="25">[23]</td> 
    The ul above will have a php while loop that will repeat it automatically? 
    */
    
    <td width="58">One star</td>
      <td width="40">*****</td>
      <td width="25">[23]</td>
      </table></td>
    </tr><td rowspan="2"></td>
    <tr><td height="4"><table style="font-size:10; position:relative; left:26px; ">
      <td width="58">two star</td>
      <td width="40">*****</td>
      <td width="25">[23]</td>
      </table></td>
    </tr>
    <td width="321" rowspan="7"></td>
    
    <td width="340" rowspan="7">&nbsp;</td>
      <td width="400" height="4"><table style="font-size:10; position:relative; left:26px;">
      <td width="58">three star</td>
      <td width="40">*****</td>
      <td width="25">[23]</td>
      </table></td>
      <tr><td width="400" height="4"><table style="font-size:10; position:relative; left:26px;">
      <td width="58">four star</td>
      <td width="40">*****</td>
      <td width="25">[23]</td>
      </table></td></tr>
      <td width="400" height="4"><table style="font-size:10; position:relative; left:26px;">
      <td width="58">five star</td>
      <td width="40">*****</td>
      <td width="25">[23]</td>
      </table></td>
      <tr>
        <td height="4" colspan="2"><img src="../images/line..gif" alt="df" width="330" height="7" /></td>
      </tr>
    <tr>
      <td width="400" height="52"><strong>Items Specifications:</strong></td>
    </tr>
        <td width="400" height="4" style="font-size:11;"><ul>
          <li>Lemon</li>
        </ul></td>
    <tr>
      <td width="400" height="4" style="font-size:11;"><ul>
        <li>Marincra</li>
      </ul></td>
    </tr>
      <td width="321" height="29" rowspan="5">&nbsp; </td>
    <td width="340" height="29" rowspan="5">&nbsp;</td>
        <td height="1" colspan="1" style="font-size:11;"><ul>
          <li>Sal</li>
        </ul></td>
        <tr>
          <td height="1" style="font-size:11;"><ul>
            <li>Tomatos</li>
          </ul></td>
        </tr> <tr>
          <td height="1" style="font-size:11;"><ul>
            <li>Plums</li>
          </ul></td>
        </tr> <tr>
          <td height="1" style="font-size:11;"><ul>
            <li>Saludos</li>
          </ul></td>
        </tr> <tr>
          <td height="1" style="font-size:11;"><ul>
            <li>Asucar</li>
          </ul></td>
        </tr>
      
    </table>
    HTML:
    I want to achieve what's below to fit and <ul> tags inside of td? because the css style of the ul below is styled in the CSS style sheet as ul and it means I will have to change everything is there a way to fit the ul inside the table and td format as it is below?

    If you notice the html code above has 5 repetitions instead the code below with the ul will repeat 5 times but with a php script that will automatically repeated..


        <td rowspan="4"></td> 
    <td height="49"><strong>Rating and Review:</strong></td><td align="center"><a href="#">Add Review</a></td>
    <tr>
      <td rowspan="1" height="4" ><table style="font-size:10; position:relative; 
    left:26px;">
    /* the ul below will repeat five times or five row of 5 star*/
     '<h3>'.($K+1).' Star Active</h3>
          <ul class="rating '.$num.'star">
    	  <li class="one">1</li>
          <li class="two">2</li>
          <li class="three">3</li>
          <li class="four">4</li>
          <li class="five">5</li>
          <li class="total">['.$total[$K+1].']</li>
          </ul>'
    /* instead of using the td below I will be using the same format of the css style that display the rating effect but I have read that displaying ul inside of td is not good. */
    /* instead of manually repeated this five times
    <td width="58">five star</td>
      <td width="40">*****</td>
      <td width="25">[23]</td> 
    The ul above will have a php while loop that will repeat it automatically? 
    */
    
    HTML:
     
    co.ador, Jul 27, 2009 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Wow, that's some heavy duty /FAIL/ on BOTH versions... TD that aren't inside TR, strong inside a TD meaning it should probably have been a TH, invalid font declarations, ... Hell, BOTH versions are such complete train-wrecks I can't even figure out what the devil that's supposed to look like.

    Both versions are complete gibberish - do you have a screencap of what you want it to look like? I'd not even TRY to use either of those code-wise.
     
    deathshadow, Jul 29, 2009 IP
  3. revolveweb

    revolveweb Peon

    Messages:
    85
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would strongly advise against doing what you are *trying* to do, it makes no sense to go against valid and "stable" HTML

    Code to a standard, it makes sense and will help you at least to debug
     
    revolveweb, Jul 30, 2009 IP
  4. Stomme poes

    Stomme poes Peon

    Messages:
    3,195
    Likes Received:
    136
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Ah, it's not a table, I've seen a piece of a screenshot... it's just a table used for layout.

    That's why he wants a list in the table&#8212; he needs a list for the ratings stars.
     
    Stomme poes, Jul 31, 2009 IP
  5. co.ador

    co.ador Peon

    Messages:
    120
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    it's a list for rating stars Well, After i have finished then i will have to proofread it with you guys. I am testing it in Firefox just at least to have a taste of how I want it to look like.
     
    co.ador, Aug 8, 2009 IP