need help with "width" in %

Discussion in 'HTML & Website Design' started by izlik, Jul 12, 2007.

  1. #1
    Ok

    I have a little problem with my header. a friend of mine made the "width" in % a while back and over time i have seen that it changes shape by itself depending on what subpage i visit. as hes on vacation in italy for another 1½ week i need some help.

    The code bellow is from my header, it's the navigation menu. everytime i try to change the with from % to actuall number like the table itself width='88%' to width="1130" it get's totaly messed up, the links aint next to each other anymore etc.

    can someone help me to cahnge it from % to number so it actully works? cause i justbreak it all the time :/ the table itself need to be 1130

    
    </table>
    </div>
    <div align=center>
    <table width='88%' class=tdrow1 cellspacing='0' cellpadding='5' align='center' border='0' id="table2">
    <tr>
    <td class='row1'  width='10%'  valign='middle'><a href='{baseWeb}/index.php'>
    {L_MHome}</a></td>
    <!-- BEGIN support_gallery -->
    <td class='row1'  width='10%'  valign='middle'><a href='{baseWeb}/index2.php'>
    {L_MGallery}</a></td>
    <td class='row1'  width='10%'  valign='middle'><a href='{baseWeb}/directory.php'>
    {L_MDirectory}</a></td>
    <!-- END support_gallery -->
    <!-- BEGIN switch_not_logined -->
    <td class='row2'  width='10%'  valign='middle'><a href='{baseWeb}/login.php'>
    {L_MLogin}</a></td>
    <td class='row2'  width='10%'  valign='middle'><a href='{baseWeb}/register.php'>
    {L_MRegister}</a></td>
    <!-- END switch_switch_not_logined -->
    <!-- BEGIN switch_logined -->
    <td class='row2'  width='10%'  valign='middle'><a href='{baseWeb}/members.php'>
    {L_MAccount}</a> </td>
    <td class='row2'  width='10%'  valign='middle'><a href='{baseWeb}/index.php?logout=1'>
    {L_MLogout}</a></td>
    <!-- END switch_logined -->
    <td class='row1'  width='10%'  valign='middle'><a href='{baseWeb}/service.php'>
    {L_MService}</a></td>
    <td class='row1'  width='10%'  valign='middle'><a href='{baseWeb}/faq.php'>
    {L_FAQ}FAQ</a></td>
    <td class='row1'  width='10%'  valign='middle'><a href='{baseWeb}/rules.php'>
    {L_MTOS}</a></td>
    <td class='row1'  width='10%'  valign='middle'><a href='{baseWeb}/news.php'>News</a></td>
    </tr>
    </table>
    HTML:

     
    izlik, Jul 12, 2007 IP
  2. chorizo

    chorizo Peon

    Messages:
    45
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Been a while since I've laid out any new HTML, so I might be wrong...but IIRC you have to be consistent in your use of % or px - so if you define the table width at 1130px you can't set the table cells to 10% but have to do the math. 113px each?
     
    chorizo, Jul 12, 2007 IP
  3. PHPGator

    PHPGator Banned

    Messages:
    4,437
    Likes Received:
    133
    Best Answers:
    0
    Trophy Points:
    260
    #3
    chorizo is correct, how wide does the navigation menu need to be? Perhaps you should change all the widths to something fixed or increase the percentage if 10% of 1130px is too small for it. Or lower it if it is too big.
     
    PHPGator, Jul 12, 2007 IP
  4. izlik

    izlik Well-Known Member

    Messages:
    2,399
    Likes Received:
    50
    Best Answers:
    0
    Trophy Points:
    185
    #4
    thanks for having me checking that again! i actully did that erlier but noticed i had counted 10 menus buttons and not 11 and devided it over 10 so it became totaly wrong, thanks again! :D
     
    izlik, Jul 12, 2007 IP