Xyphon Posted July 22, 2009 Share Posted July 22, 2009 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; } Quote Link to comment Share on other sites More sharing options...
haku Posted July 22, 2009 Share Posted July 22, 2009 CSS without HTML is like icing with no cake. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted July 22, 2009 Author Share Posted July 22, 2009 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>"; Quote Link to comment Share on other sites More sharing options...
haku Posted July 22, 2009 Share Posted July 22, 2009 That's php and HTML mate. Just HTML please. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted July 22, 2009 Author Share Posted July 22, 2009 <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> Quote Link to comment Share on other sites More sharing options...
haku Posted July 22, 2009 Share Posted July 22, 2009 That HTML isn't the same as the HTML for the page you are showing us in the image - there is no word 'punch' anywhere in it for example. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted July 22, 2009 Author Share Posted July 22, 2009 Because Punch is drawn from the database, and you told me to remove the PHP. Quote Link to comment Share on other sites More sharing options...
haku Posted July 22, 2009 Share Posted July 22, 2009 I didn't say remove the php, I said just give HTML. It's hard to debug something when it's not all there. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted July 22, 2009 Author Share Posted July 22, 2009 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> Quote Link to comment Share on other sites More sharing options...
haku Posted July 22, 2009 Share Posted July 22, 2009 add: overflow:auto; to div.table_replace Quote Link to comment Share on other sites More sharing options...
Xyphon Posted July 22, 2009 Author Share Posted July 22, 2009 Made no difference. Quote Link to comment Share on other sites More sharing options...
haku Posted July 22, 2009 Share Posted July 22, 2009 Gonna need a link then, because it worked when I ran it on my local installation. Quote Link to comment Share on other sites More sharing options...
Xyphon Posted July 22, 2009 Author Share Posted July 22, 2009 Actually, it didn't seem to work because of a cache problem which sometimes makes things update slow for me. It works fine, thanks a lot! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.