...

View Full Version : Changing TD vertical size



rfresh
11-15-2010, 04:11 AM
I need to increase the vertical size of a TD tag. How can I do this? I need to make it about 4 times as tall as a default TD tag.

Thanks

teedoff
11-15-2010, 04:37 AM
You mean rowspan="2"?? That merges one row with the next row.

rfresh
11-15-2010, 05:23 AM
Not sure that would work. See attached image and you can see that I need to increase a row's height to accomadate some vertical text I'm laying down.

Chris Hick
11-15-2010, 05:30 AM
Have you tried giving your td an id?



<table id="great">
<tr>
<td id="grand1">&nbsp;</td>
<td id="grand2">&nbsp;</td>
<td id="grand3">&nbsp;</td>
</tr>
</table>

rfresh
11-15-2010, 05:39 AM
I don't understand what an ID would do to the height of a TD tag?

Chris Hick
11-15-2010, 05:40 AM
Do you know anything about css?

rfresh
11-15-2010, 06:20 AM
I'm pretty new to CSS.

Chris Hick
11-15-2010, 06:35 AM
Ah I see.. well then I suggest going to learn some at http://www.w3schools.com/css/
:thumbsup:

rfresh
11-15-2010, 06:46 AM
Wow...you could give that answer to everyone instead of trying to actually help them.

To anyone else who wouldn't mind helping me, I'll repeat my question: I don't understand what an ID would do to the height of a TD tag? I'm asking about what attribute? I can setup the id but I don't know what attribute to use.

Chris Hick
11-15-2010, 07:20 AM
-_- No sense in being rude. You might want to reread the rules: [url]http://www.codingforums.com/rules.htm[/code]

The id is for CSS. In other words, in your style tags in css you would put the height attribute to the id thus to the td.
If you are going to use just html, I suppose putting the height=" " attribute within the td tag would do. Although, I highly suggest not doing that and learning some CSS.:thumbsup:

Stubworth
11-16-2010, 01:19 AM
Hi rfresh,

Here's what you can try. Pop this code in your header:


<style type="text/css">

#specificrowheight
{
height:50px;
}

</style>


A # tag, specifies that the CSS information is to be used as an ID. A full stop before the name means that it is to be used in a class="...." attribute.

You can change the height figure, in the form of a percentage, or a pixels figure, as above.

Then, go to your table, and find the <td> which you're wanting to edit. Change that to:



<td id="specificrowheight">&nbsp;</td>


This should make that particular section of the table have the height of it's ID, as defined in the CSS in your header.

That's the difficult way of doing it, you can also just edit for your <td> like so:



<td height="50">&nbsp;</td>


The figure denotes the height in pixels. Note that if your content exceeds the given height, the <td> will continue to expand, but this might let you make the <td> big enough to fit your text in properly.

Let me know how it goes! :)

rfresh
11-16-2010, 04:47 AM
@stubworth

OK, so with your help I got the height working but now it's too wide and my width attribute does not seem to work no matter what I try and size the width to!

See attached image of this code:



#vertical_text {
writing-mode: tb-rl;
-webkit-transform:rotate(270deg);
-moz-transform:rotate(270deg);
-o-transform: rotate(270deg);
height:66px;
width:10px;
}




<TD id="vertical_text">

santhoshj400
11-16-2010, 10:15 AM
Not sure that would work. See attached image and you can see that I need to increase a row's height to accomadate some vertical text I'm laying down.
Hi,
try placing a div inside td and give height to that div i think this should work
any query let me know

Stubworth
11-16-2010, 07:30 PM
Double check that the width isn't being affected by any properties you've given to other cells in the table, or within any <div>'s which precede it.

Post the full code for the page, including any CSS and I can take a look for you.

Also, ensure that you don't have any spacing elements, e.g. &nbsp; within the table, as this may be affecting the width.

I'll do my best to help, but really need the full code! :)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum