PDA

Click to See Complete Forum and Search --> : (html, javascript, & css) Stop pushing my table around. **Resolved**


msimmons
Jun 21st, 2002, 04:02 PM
I have a calendar that is a table. I have the width set via css in the table's ID. I have 3 spans in each 'day' that I am changing dynamicly via outerHTML. The 3 spans are set to width:100%. Sometimes when I write to the spans it pushes my cells. if they are 100% then they shoulden't right?
I appologize for this incoherant post, I have worked too hard on a friday to make sense anymore and I still have 1.5 hrs to go.
Thanks
Michael

scoutt
Jun 21st, 2002, 11:09 PM
all depend son how the tabel and cells are set. if they are a fixed width then they shouldn't expand. but if you set them to 100% then they will expand and devide evenly amongst themself in order to get the content in there. so yeah some can expand.

msimmons
Jun 24th, 2002, 09:02 AM
Sorry... I was pretty braindead when I posted that... I should have explained my setup fully.
The table has its width set in it's class. And in the CSS table tag definition I have "padding:0px;margin:0px;border-collapse:collapse;". Each cell has its width set also and they add up to the correct width of the table. Inside each cell is 4 spans all set to 100% What is happening is that I am outerHTML'ing different values to the spans from a hidden frame and sometimes it will move one cell to be 1px bigger and another 1px smaller (or vicea verca, not sure).
Michael

msimmons
Jun 24th, 2002, 01:14 PM
**bump**

scoutt
Jun 24th, 2002, 01:46 PM
do you have a smaple of what is happening. I am having a hard time seeing it.

msimmons
Jun 24th, 2002, 02:07 PM
Originally posted by scoutt
do you have a smaple of what is happening. I am having a hard time seeing it.

Check your PM's :)

scoutt
Jun 24th, 2002, 02:16 PM
ok I see. when you click on a date what does it insert? if it is one word or one number then it won't wrap them. it won't split the word. can't you make the calendar bigger? I mean you have a lot of wasted space on the far right side.

ok now it has changed, did you fix it? also I can't see the text on the bottom when you click on a date? I don't get a scroll bar

msimmons
Jun 24th, 2002, 02:26 PM
Originally posted by scoutt
ok I see. when you click on a date what does it insert?
If you view source on the lower 10% of the window that is my hidden frame and you can see what has been outerHTML'ed

if it is one word or one number then it won't wrap them. it won't split the word.
its usualy 3 digits "100" for example... not nearly enough to need to wrap and it's in a span that is set to 100%

can't you make the calendar bigger? I mean you have a lot of wasted space on the far right side.
can't It will eventualy populate a small frame in a site... so it's a big as it can get.

ok now it has changed, did you fix it? also I can't see the text on the bottom when you click on a date? I don't get a scroll bar
I haven't changed anything (that is a version I uploaded just for you)... I assume the text you are speaking of is the test data in the 'hidden' frame.

Michael

scoutt
Jun 24th, 2002, 02:40 PM
ok. that makes since. so when I click on the 25th the 100 goes next to the #

this is what I see when I click on 25

25 150200

and all that is being squished into a small area. see when you set the table to a set widthand then a span to 100% of that set width you will only get so big. then you cram a large number in there it will expand the current cell and shrink the others to compansate. but I also noticed the after I clikc on a few the number is going below the date. that is how it's suppose to be isn't it?

msimmons
Jun 24th, 2002, 02:50 PM
Originally posted by scoutt
ok. that makes since. so when I click on the 25th the 100 goes next to the #

this is what I see when I click on 25

25 150200


actualy its doing this (or supposed to)
150
200

see the date # is in a span and each rate is in its own span. like this.

<td>
<span>25</span>
<span>150</span>
<span>200</span>
</td>

the spans are set to position relevant and width 100% so I was assuming they were below each other. I am writing the date # when the page loads and adding the rates when the viewer clicks a date.
Michael

scoutt
Jun 24th, 2002, 02:54 PM
no unless you put a <br> after the spans then you will continue on one line. spans aren't block levels so it will keep going until you tell it to go to a different line.

msimmons
Jun 24th, 2002, 03:03 PM
YOU ARE AWESOME!!! :)
I have been stuck on that for 1.5 days!!! all it took was a few <br>'s
Thanks again
Michael

scoutt
Jun 24th, 2002, 03:05 PM
cool glad it worked out for ya. keep up the good work