PDA

View Full Version : Can I make this thinner?



Toefur
March 23rd, 2002, 10:46
I want to have a bar accross the top of my pages. On this bar I want there to be a drop down menu.

Ie: http://toefur.com/dropdown.html

Something like that.

But it's too... thick. Like, I want the table to end just under the drop down menu, and not have the whole extra bit.

The only way I have been able to do it is by taking out the <form> bit, but of course that the renders the javascript useless.

I know it can be done because I have seen what I want to do, done on other sites before.

Any help appreciated.

Bruce
March 23rd, 2002, 10:56
You can add a height attribute to your <td> tag.

meow
March 23rd, 2002, 12:54
Old way: move the form tags outside the cell the controls are in. I'm not sure but I think I've read that that can break in one of the v. 6 browsers.

Better is to take off the margins.

<style type="text/css">
<!--
form { margin: 0 }
-->

If you want different margins you can write it like so:

form { margin: 2px 4px 0px 3px }

The values refer to top, right, bottom and left in that order. Values other than "0" nead a unit.

Dusty
March 23rd, 2002, 13:04
An even less compliant-to-standards trick is to put the form between the <table> and <tr> tags. Example:
<table>
<form ...>
<tr><td>
...
</td></tr>
</form>
</table>That works in every browser I've ever tried it in, but it's far from proper.

Aquatix
March 25th, 2002, 06:29
I've had this problem. Even if you set the <td> tag to 1/2/3, a void below the menu still occurs.

Its as though its a part of the script, I CANNOT get it to go!

The only way I've achieved it is to use frames and chop of the void by setting the frame to the exact height I want and turning off the scroll...

- Aquatix

Toefur
March 25th, 2002, 23:14
Thank you very much guys. :cool:

I almost just went for Dusty's way... but meow's is good, and proper, works nicely. Although, I havn't tested it in netscape... so I don't know what that's going to do to it. :devious2:

Aquatix, just use the css way, it works. :cool:

meow
March 25th, 2002, 23:40
If you mean the style stuff I don't think it works in NS4 but that's no biggie in this case.

The other way, to move the form tags out have worked in all. You don't need to put them between table tags you can put them outside the table or in other cells, whatever. But as said, I'm almost sure I've read this can screw one of the v.6 browsers up. Better it looks a little off in an old one.