|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
tables, spans, graphics ahhhh!!!
I am having major issues with tables.
firstly a few things that I already know. I know how to col span and row span and I also know when graphics/items fit in there with larger sizes the content will auto enlarge. These I know, what I do not know is why my project is not working. When I have the page laid out with out one certain graphic it is fine, cell widths and heights all perfect. The cell in question is one which is row spaned. -- perfect but needs the image in there! When I do not row span with this cell has it's graphic in it the cell increases in size and the whole thing scrolls. In understand this because there is no other variable height there. -- graphic too big, need to scroll, so need to row span When the row span is in effect what happens when I put the graphic in... The 2 cells to the right of the 2 span col decide to change there widths for no reason. AND the whole page scrolls both horz and vert! BUT the graphic is SMALLER than the space, I can prove this because I align it to the middle and there is space above AND below the image. so what gives? are there any rules for this? |
|
#2
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
When you start using colspans and rowspans to layout your table the browser is just guessing what the dimension of each cell should be. It will not make a perfect fit, since the browser is aiming for speed and not perfection.
You should just try using nested tables, or step away from tables at all and start using layers (<div>'s), since tables are not meant to be used to format pages in the first place... |
|
#3
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
I would LOVE to use divs, infact I have a web site builder in php which uses div normally.
problem is I need this site to be STATIC and I also want the stuff to layout on the whole screen no matter what the screen res is. so I have a choice of using javascript to reposition the divs or tables, I thought tables would be easier I was wrong! BUT me being me, I have started so I will finish! or I find a limit on HTML (that is just me!) so I a determined to find what the heck is happening here. I am no slow poke I know everything is set up right, but why does the other cells resize when I throw the graphic in when the graphic has bags of room. are there any other factors OR is this another bug in the browser (would not be the first one I have found!) that it just can't handle it! |
|
#4
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
Do you have an address where we could see the code in question?
|
|
#5
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
Try using style="table-layout: fixed" in your <table> tags
If you need colspans already in the first row, set a set of colgroups with their fixed width defined. This should keep your table straight |
|
#6
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
new complex tables.
do rowspans still work when used with colgroups? |
|
#7
|
|||
|
|||
|
RE: RE: tables, spans, graphics ahhhh!!!
Quote:
Sure, for instance you can easily do this: <table style="table-layout: fixed"> <colgroup> <col style="width: 100px"></col> <col style="width: 100px"></col> <col style="width: 100px"></col> </colgroup> <tr> <td colspan="2">spanned</td> <td>single cell</td> </tr> </table> by explicitly setting the table-layout to fixed, and already specifying the width for each column this table probably will render as expected. |
|
#8
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
ok well I added the fixed style, which did make them fixed BUT is also fixed them to the wrong dimensions!
I will have to play around with this. you can still use * with fixed though right? because I do need that |
|
#9
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
example - at last
after using fixed style it has got better. first step is to work out why the width of the left hand side box (one down from the top) is NOT changing, no matter what I set it too ALSO I have tried to set both widths listed. on this example you can see that the cols have the width:height used in the cell itself. |
|
#10
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
forgot the url, I'm good.
http://projectx.hysteriaweb.net |
|
#11
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
I will also add the cols width as per your example
|
|
#12
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
ok, cols are sorted out
all was fine until I put my graphic in, now take a look! the height of the 2 cells next to the graphic are all messed up, the bottom one is meant to be 58. without the graphic it is fine, with the graphic it is not! I just don't get it! |
|
#13
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
guess I should throw the widths for the rows in the TR!
|
|
#14
|
|||
|
|||
|
RE: RE: tables, spans, graphics ahhhh!!!
Quote:
That's not allowed, TR doesn't have height or width; it's just a placeholder. I'll try to make a setup with div's |
|
#15
|
|||
|
|||
|
RE: tables, spans, graphics ahhhh!!!
that did nothing!
|
![]() |
| Viewing: Codewalkers Forums > Other Technologies > Client Side Things > tables, spans, graphics ahhhh!!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|