Very basic questions....

They have: 330 posts

Joined: Apr 2000

I have a few questions I keep forgetting to ask. I have been able to figure out just about everything I have problems with without asking for too much help, but this doesn't make sense to me.

1. When creating a table with a width of 100% I know I can make the td formatted like 30%, 20%, 50%, etc. How would I make the first td 140 px, the second one change sizes, and the third one 100 px? I have tried to just leave it blank but that makes the 140 and 100 px tds turn into a very different number.

2. How do I make an hr tag not take up 3 or 4 pixels on the top and bottom of it? (sorry, I know it's already been asked in another post)

3. How would I make 3 forms consisting of only hidden fields and submit buttons show up on top of each other without creating a space between the buttons. Every time I close a form it creates a br for some reason. I am sure there is a way to have 3 buttons on top of each other, but do they have to be on the same form?

Thanks for any help. I am sure I will think of more basic questions during the day and I will post them too.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

1.

<table >
<tr>
  <td width=140></td>
  <td width=100%></td>
  <td width=100>
</tr>
</table>
'
2. I don't know. I guess the 1x1 img that was suggested in the other thread will have to do.

3. Use style=margin: 0" It works in IE, haven't tried NN.

< form style="margin: 0" >
< input type=submit >
< /form >
'

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 330 posts

Joined: Apr 2000

thanks, the 1st one didn't come through. Thanks for the margin thing

detox's picture

They have: 571 posts

Joined: Feb 2001

Easiest way to do this is like this:

declare the width of the middle cell as width="*"

then the cell automatically resizes to fit the screen

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

sorry... it's there, but the HTML isn't getting escaped properly yet...

< table >
< tr>
  < td width=140 >< /td >
  < td width=100% >< /td >
  < td width=100 >< /td >
< /tr >
< /table >
'

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 330 posts

Joined: Apr 2000

I am pretty sure I've tried the 100% in the middle one and it made the 140 and 100 too small. I haven't tried the * even though I know that's how to do it with frames. I will try both of those. Thank you for your help.

Mark,
You have answered a lot of my questions. Thank you very much. I'm sure there will be more to come.

Thank you too detox.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

Some browsers will collapse cells... to prevent this, you need to 'brace' it with something. Fireworks uses a transparant 'shim.gif' and creates a 1px high row at the top and 1px wide collumn on the left of all its tables. You could try that...

(PS - HTML fixed, and I see a typo in my first post. uh oh! Wink)

Mark Hensler
If there is no answer on Google, then there is no question.

They have: 330 posts

Joined: Apr 2000

I could probably just make a 1x1 transparent gif in photoshop also right?

They have: 330 posts

Joined: Apr 2000

What do the following codes do?

The wrap part of...

< td nowrap >
'

And the Virtual part of...

< textarea wrap = virtual >
'

Thanks again.

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

This prevents text from wrapping in table cells. Instead, the cell will strecth to fit the text. The cell will never me smaller than the defined sizes.

The valid options are off,virtual(IE),physical(IE),soft(NN),hard(NN). A value of off will prevent text from wrapping, and you will have horizontal scrollbars. A value of soft or virtual will wrap text and will remove line breaks submitted to the server. A value of hard, or physical will wrap text and include line breaks submitted to the server. Off is the default for NN, and I think physical is the default for IE.

Mark Hensler
If there is no answer on Google, then there is no question.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.