3 replies [Last post]
bruno
Offline
newbie
Last seen: 17 years 20 weeks ago
Joined: 2003-03-27
Posts: 2
Points: 0

Hi All

I'm not sure if you can do this but I have heard that you can.

It seems that my Form creates a carriage return when it is closed - BUT my page design gets messed up by this unwanted, meddling carraige return.

Does anyone know how to remove the carraige return from a </form> tag using CSS?

Any help is appreciated.

Thanks

dJomp
dJomp's picture
Offline
Enthusiast
Last seen: 4 years 28 weeks ago
Joined: 2003-03-23
Posts: 422
Points: 0

Remove Carriage Return from closing Form tag

I don't know if it can be removed with CSS...

I think it's a browser thing, some might add a carriage return, some not. If you're trying to do things inline, I don't think it will work, but something like:

<form> ... <div> {visual stuff} </div> </form>

removes some default padding. But then the carriage return appears in the parent <div>(or whatever).

Random babble. Hope someone else can help some more!

You know you're a geek when you try to shoo a fly away from the monitor with your cursor.

nexia
nexia's picture
Offline
Regular
Last seen: 17 years 20 weeks ago
Timezone: GMT-5
Joined: 2003-03-22
Posts: 42
Points: 0

Remove Carriage Return from closing Form tag

the extra space built from the "carriage return" like you say is when your browser manage the form content... you have to set your form correctly then:

instead of:

<form blah blah>
<table>
<tr><td> my table content and form stuff</td></tr>
</table>
</form>

try this:

<table>
<form blah blah>
<tr><td> my table content and form stuff</td></tr>
</form>
</table>

that way, instead of forcing a new line in your table (if you'd place your form start/end inside the <td >, you block it to be shown, in the table tag itself...

you have different ways to disable that space.. test them that way. this is an example applyed on a table, but in a div or anything else, it's the same...

this is not a single bit related to CSS, but to HTML ...

nexialism source of all knowledges

bruno
Offline
newbie
Last seen: 17 years 20 weeks ago
Joined: 2003-03-27
Posts: 2
Points: 0

Remove Carriage Return from closing Form tag

Hi

Thanks for your replys - but I have actually found the answer (and it is resolved within CSS).

by adding class="searchform" into the <form> tag;

<form class="searchform">

and then adding the following line of CSS code into your style sheet;

form.searchform {display: inline;}

It removes the carriage return - great!

Loads of CSS info at;
http://www.w3schools.com/css/default.asp

Thanks All