1
<tr>
<td class="mHeads" rowspan="4" > GENERAL </td>
<th class="subHeads"> 2G Network </th>
<td class = "currentSel"><?php echo $row["2GNetwork"];
</td>
</tr>




.currentSel {
width:230px;
border:1px solid black;
max-width:230px;
height: 35px;
}

In the above code, the echo statement is overflowing the data rather than adding increasing the length of the row. Can anyone help me how to fix it without using the overflow property?

2
  • why you do not increase the height or the width of the cell in css ? Commented Jan 16, 2012 at 11:07
  • I needed word wrap actually! And the problem is solved. Thank you though! Commented Jan 16, 2012 at 12:02

1 Answer 1

1
.currentSel {
  width:230px;
  border:1px solid black;
  max-width:230px;
  height: 35px;
      overflow-y: auto
}

Already you have used width and height so, there is no way to get the extra space, only thing you can do is add overflow-y: auto or remove width or height.

Sign up to request clarification or add additional context in comments.

2 Comments

I commented the height part and i do need to fix the width in order to make it stay in a specific div and to split the screen. But the data overflows and i don't want to put scroll in the data. Isn't there anyway that the height increases automatically with the amount of data in "td" tag?
You could use word-wrap on your cell for that <td style="word-wrap:break-word"></td> and if you want it to stay in the cell you should set <table style="table-layout: fixed">

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.