Jump to content

[SOLVED] DIV not stretching properly


Xyphon

Recommended Posts

Okay, well, I created a div with a specified width, and when I use it it all works fine. BUT, if the text is too big for the DIV, instead of stretching normally, it does something like this(note I put arrows and notes to point it out for you):

 

http://i25.tinypic.com/35mmyq9.png

 

Here's the code for the DIV

 

.table_replaceb2 {
border: 1px solid black;
float:left;
width:115px;
}

Link to comment
Share on other sites

I have the html... If I didn't, I wouldnt be able to tell it didnt work. Do you want to see the html?

 

There's PHP in it too:

 

        echo "        
<div class='table_replace'>
        <div class='table_replaceb'>" . $Battle_Rows['Enemy_Name'] . "            Level: " . $Battle_Rows['Enemy_Level'] . "<br />
        HP: " . $Battle_Rows['Enemy_HP'] . "/" . $Battle_Rows['Enemy_Max_HP'] . "            Chakra: " . $Battle_Rows['Enemy_Chakra'] . "/" . $Battle_Rows['Enemy_Max_Chakra'] . "</div><br /><br /><br /><br />
        <div class='table_replaceb2'>Taijutsu:<br /><a href='battle.php?Type=Taijutsu'>" . $Battle_Rows2['Taijutsu'] . "</a><br /></div><div class='table_replaceb2'>Ninjutsu:<br /><a href='battle.php?Type=Ninjutsu'>" . $Battle_Rows2['Ninjutsu'] . "ffffffffffffffff</a><br /></div><div class='table_replaceb2'><font size='3'>Genjutsu:<br /><a href='battle.php?Type=Genjutsu'>" . $Battle_Rows2['Genjutsu']. "</a><br /></div><div class='table_replace'>Weapon:<br /><a href='battle.php?Type=Weapon'>" . $Battle_Rows2['Weapon'] . "</a><br /></div><br /><div class='table_replaceb'>
        " . $Battle_Rows2['Username'] . "            Level: " . $Battle_Rows2['Level'] . "<br />
        HP: " . $Battle_Rows2['HP'] . "/" . $Battle_Rows2['Max_HP'] . "            Chakra: " . $Battle_Rows2['Chakra'] . "/" . $Battle_Rows2['Max_Chakra'] . "</div></div>";

 

Link to comment
Share on other sites

  <div class='table_replace'>
        <div class='table_replaceb'>            Level: <br />
        HP:             Chakra: </div><br /><br /><br /><br />
        <div class='table_replaceb2'>Taijutsu:<br /><a href='battle.php?Type=Taijutsu'></a><br /></div><div class='table_replaceb2'>Ninjutsu:<br /><a href='battle.php?Type=Ninjutsu'>ffffffffffffffff</a><br /></div><div class='table_replaceb2'><font size='3'>Genjutsu:<br /><a href='battle.php?Type=Genjutsu'></a><br /></div><div class='table_replace'>Weapon:<br /><a href='battle.php?Type=Weapon'></a><br /></div><br /><div class='table_replaceb'>
            Level: <br />
            Chakra: </div></div>

Link to comment
Share on other sites

OK..

   <div class='table_replace'>
        <div class='table_replaceb'>Xyphon            Level: 9<br />
        HP: 148/148            Chakra: 18/18</div><br /><br /><br /><br />
        <div class='table_replaceb2'>Taijutsu:<br /><a href='battle.php?Type=Taijutsu'>Punch</a><br /></div><div class='table_replaceb2'>Ninjutsu:<br /><a href='battle.php?Type=Ninjutsu'>Fire Ball Jutsuffffffffffffffff</a><br /></div><div class='table_replaceb2'><font size='3'>Genjutsu:<br /><a href='battle.php?Type=Genjutsu'>Substitute</a><br /></div><div class='table_replace'>Weapon:<br /><a href='battle.php?Type=Weapon'>Kunai</a><br /></div><br /><div class='table_replaceb'>
Xyphon            Level: 9<br />
        HP: 83/148
            Chakra: 18/18</div></div>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.