rydiemikey Posted February 22, 2006 Share Posted February 22, 2006 Does anybody know how to get rid of the carriage return when you close a form?Here's an example of my problem.I have a toolbar consisting of form buttons that link to different pages on the site. These buttons are in a table with the options <table border=0 cellpadding=0 cellspacing=0>. The problem is that the toolbar has gotten too long, and when I cut the bar and drop half to a new row, I get a line of whitespace between the two rows. I experimented with this, and it seems that the <form> code is appending a line break or carriage return to the end of the button. I determined this by commenting out sections of my code until I got it to work.Using buttons like this in a two row, borderless table will leave a line of whitespace between rows due to the line break or carriage return:<form action="path/page.html" method=\"link\"><input type="submit" name="test" value="test"></form>But, if you remove </form> like this:<form action="path/page.html" method=\"link\"><input type="submit" name="test" value="test">Then you don't get the whitespace. Your buttons don't work, however. When you remove the </form> tag, what happens is that every button in the table takes you to the same place as the link in the first button in the table (the first form to open). I'd really like to keep the buttons in tables, because it makes it easier to control them as a toolbar 'unit'. I don't know how to work around this though. Separating the two rows into two tables doesn't work, because the whitespace is in the cell with the button, like this:------------|BUTTON||<blank>|------------When what I want is:------------|BUTTON|------------Anyone have any ideas?Thanks for any/all help.RyanBTW, I am aware that you can make a link button by using the <button> tag and some Java. The thing is, I'd like to avoid Java if at all possible. I know that just about everybody has it, but I'd like to not be dependent on what the user may or may not have installed. Quote Link to comment Share on other sites More sharing options...
AndyB Posted February 22, 2006 Share Posted February 22, 2006 It's a matter of style. Adjust to suit:[code]<form style="margin:0; padding:0;" action="path/page.html" method=\"link\">[/code] Quote Link to comment Share on other sites More sharing options...
rydiemikey Posted February 22, 2006 Author Share Posted February 22, 2006 Thank you very much for the code. I knew there had to be a way to do it, I just couldn't find it. I looked through the manual, but, to be honest, I was trying to multitask (something I am singularly unqualified to do) and I probably looked right past it.Thanks again.Ryan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.