tags:

views:

20

answers:

2

In a table of mine I have the table header, th which have two separate links in each cell. Each of them wrap to a new line which I don't want. If I remove all the style sheets it doesn't fix it. If i disable style sheets in the browser it fixes it but there are no inline styles that would cause the wrapping. If they are non-hyperlinked words they don't wrap. If i use the td tag it doesn't fix it either. There is too much code all over the shop to post but all I want is in a th cell a word with an image next to it with a different hyperlink.

Here is a quick bit of code. Although doing nowrap does work in this quick look it doesn't work in the actual code for some reason.

<table> 
    <tr>
      <th>Time:</th>
      <th style="width: 8%">
        <a href="week.php?year=2010&amp;month=4&amp;day=7&amp;area=2&amp;room=20">V505(2)</a>
        <a href="http://www.google.com"&gt;&lt;img src = "images/information.png" width = "25" height = "25" border = "0"/></a>
      </th>
      <th>Time:</th>
    </tr>
  </table>
+1  A: 

Any reason why you can't do a white-space: nowrap;?

Azeem.Butt
I tried this and it doesn't work. I've tried to give a quick look at the code and this works in the snippet code but not in my code
Rudiger
On testing this further if I have white-space:nowrap and disable one of my style sheets it works, enable the style sheet and it goes back to normal. Looking through the style sheet now to try and figure where it breaks
Rudiger
Although it wasn't the answer it sort of kicked me in the right way. Display: block was in the css but just removing it didn't do anything and it needed the white-space: no wrap as well as removing the block style to work. I hate CSS :(
Rudiger
A: 

Have you tried setting the width to a measure instead of a %? With no width specified on the Table, the browser might not be sure what 8% means (unless of course, these are specified in some styles).

Jeff Siver
Yup tried it. doesn't work :(
Rudiger