0

Im having a trouble using my contact form generator .

When i use the jQuery slider, and if i move the slider to '0' the whole form moves a bit on the right. And if i move the slider to '100' the whole form moves a bit to left.

I use tables in order to keep the structure of the form. Link to my form

Reporter
  • 3,897
  • 5
  • 33
  • 47
Michael Schinis
  • 697
  • 1
  • 7
  • 21

2 Answers2

1

You haven't accounted for the relative position of the container that shows the number of currency; as the decimals get bigger is pushes your content. either make it absolutely positioned or account for the maximum space is can occupy (give it a width that has space for 100).

You have to do that to the parent that determines the layout. in this case the th of the table. I strongly advice you to stop using tables as a tool for making layouts. you should use semantic tags that are made for creating layouts.

makeitmorehuman
  • 11,287
  • 3
  • 52
  • 76
  • Thanks.. That fixed it.. I know using tables is not good for layout, so im working on a new version that i will only use divs for the structure.. – Michael Schinis Aug 05 '11 at 13:16
0

It's just a problem for the size of your label, you're putting a fixed width (width:20px) on your label, which is an inline element.

But you can't do that on inline elements so it's size change as the text change. If you put a div around, like that: <div style="width:40px">yourtext<label></label></div> the width won't change.

Edit: to get a better idea on the use of width with inline elements: CSS fixed width in a span

Community
  • 1
  • 1
Py.
  • 3,499
  • 1
  • 34
  • 53