News:

Wondering if this will always be free?  See why free is better.

Main Menu

Getting a form NOT to start on a new line?

Started by Grudge, August 24, 2003, 10:22:39 AM

Previous topic - Next topic

Grudge

Hi,

I was wondering whether/how it's possible to get a HTML form to not start a new line. Below is an example screenshot:
www.p0stwh0res.com/smftest/pages.jpg

I want the edit box to be on the same line as the numbers. Surrounding the nubmers with the form brackets is NOT an option. I'm thinking maybe having to use tables?? I *really* don't want this tho :(

HTML for it is basically
<font>Pages: 1, 2</font><form name=etc etc etc> <input type = text></form>

(simplified obviously :) )

Thanks for any help!
I'm only a half geek really...

۞

IMO, the easiest way would be to simply put them in 2 table cells.

<tr>
<td>Pages 1<font>Pages: 1, 2</font></td>
<td><form name=etc etc etc> <input type = text></form></td>
</tr>
TTTTTT  OOOOOO MMMMMM   BBBBBB


Grudge

Thanks for the help but I found out how to do it. Just added:
display:inline
To the style for the form and it worked a charm! Job done!
I'm only a half geek really...

[Unknown]

That won't work on all browsers.  I did it for glow/shadow only because it is the only way.

It'd be better for cross browser compatibilty if it used another table cell...

-[Unknown]

Aquilo

Quote from: JkWhoSaysNi on August 24, 2003, 10:40:53 AM
IMO, the easiest way would be to simply put them in 2 table cells.

<tr>
<td>Pages 1<font>Pages: 1, 2</font></td>
<td><form name=etc etc etc> <input type = text></form></td>
</tr>


taking the opening and closing tags out of the table structure will
stop the form  from creating a new line:


<table>
<form name=etc etc etc><tr>
<td>Pages 1<font>Pages: 1, 2</font></td>
<td><input type = text></td>
</tr></form>
</table>


you can view the source of this page to see what I mean! this was once one of my biggest headachs also. ;D

[Unknown]


Aquilo

someone needs to go to w3c and propose the right placement of form tags. ;D

even there form tags are outside the table and that messes with validating the table :P

any way it's so small they might reject it, everything getting assigned has to do with XML ::)

[Unknown]

Why?  There are perfectly valid ways to fix this problem, and there are reasons <form> is not allowed between <table> and <tr> or <tr> and <td>.

-[Unknown]

Tim

Guys, the W3C has provided a great way to do this

add this to your css:


form {
    padding: 0px;
}


Why make things harder then they really are?

Grudge

Hi,

thanks for all the help!

I'm gonna try tims method later. The problem is on seconds thought I can't rely on being able to use table tags. Basically, this code goes in a function that *may* be part of a table but may not. I basically have to assume that it isn't part of a table. Hopefully the padding solution shall work and be legal :D

* Grudge hopes
I'm only a half geek really...

Tim

I'm quite sure it's padding, but should that fail try margin: 0px;

I'm not sure anymore :)

Parham

I use:

FORM { DISPLAY:inline; }


which seems to work fine

Grudge

Quote from: [Unknown] on August 24, 2003, 07:37:42 PM
That won't work on all browsers.  I did it for glow/shadow only because it is the only way.

It'd be better for cross browser compatibilty if it used another table cell...

-[Unknown]

Unknown - why would it not work on other browsers? I checked the CSS specification and display: inline was part of CSS1 - so surely it *should* be supported as that's now 7 years old!

FYI, where I need this is in the code I made to add a jump box to the page index function and basically using tables in any respect is impossible. I basically can't do it without display: inline without the box looking funny on some of the pages where it is used. Don't all (not completly outdated) browsers support CSS1??

I must confess to being ignorant in this respect.

PS - link to CSS specification entry:
http://www.w3.org/TR/REC-CSS1#display
I'm only a half geek really...

Grudge

BUMP! Can someone please tell me why display: inline is a bad choice? It's the *only* way I can get my formatting to work and need to know a valid reason not to use it. I don't want to create something that doesn't look anything like right for people using other browsers
I'm only a half geek really...

[Unknown]

If you must do it in contructPageIndex, it's the best way.

-[Unknown]

Advertisement: