# Thread: Colspan and rowspan ruining cell dimensions

1. Registered User
Join Date
Jul 2007
Posts
9

## Colspan and rowspan ruining cell dimensions

I need to accomplish a layout like this:
Code:
```<table>
<tr>
<td colspan=2 rowspan=2>? by ?</td>
<td width=7 height=7>7x7</td>
</tr>
<tr>
<td height=7>?x7</td>
</tr>
<tr>
<td height=7 width=7>7x7</td>
<td height=7>?x7</td>
<td height=7 width=7>7x7</td>
</tr>
</table>
<!--
expected:
_____________
| ? x ? |7x7|
|       |7x?|
|7x7|?x7|7x7|

actual (ie):
__________________
| ? x ?     |7x?/2|
|           |7x?/2|
|?/2x7|?/2x7| 7x7 |
-->```

Any idea how to overcome this ie oddity?

2. Registered User
Join Date
Jul 2007
Posts
9

## Clarification

There was some confusion in another forum regarding my explanation, so here's my clarification:

"?" is the variable height of the large cell. In the cases of cells 0,3 and 1,3 "?/2" indicates that their height is half that of the large cell.

Instead I need: height of 0,3 = 7; height of 1,3 = ?-7.

3. You are contradicting yourself; in the first post all heights are set to 7px and the second post you have a problem with height.

As it's for a layout you should be using css.

4. Registered User
Join Date
Jul 2007
Posts
9
Originally Posted by Fang
You are contradicting yourself; in the first post all heights are set to 7px and the second post you have a problem with height.
It happens with both height and width. I'll simplify:
Code:
```_________________________
| x height | 5 height   |
|          | x-5 height |```
As it's for a layout you should be using css.
I've tried. Couldn't come up with a solution. If you can, please advise.

5. Why do you need to fix the height/width?
Give a practical example of the problem.

6. Registered User
Join Date
Jul 2007
Posts
9
I'm making a dropshadow using pngs with alpha transparencies. I need 3 corner images and tiling edges.

7. Registered User
Join Date
Jul 2007
Posts
219

This should get you to where you're trying to go. :]

8. Registered User
Join Date
Jul 2007
Posts
9
Originally Posted by Ferret

This should get you to where you're trying to go. :]

It's great for static-sized shadows. But I'm looking to make a dynamic sized one.

9. Registered User
Join Date
Jul 2007
Posts
9
What I'm trying to accomplish is a dynamically sizing drop shadow frame using png images. So I need a static sized corners and stretching edges so it'll fit whatever I put inside it.

This works beautifully in firefox but not ie:
Code:
```<style>

background-position: top right;
background-repeat: no-repeat;
margin-top: 7px;
}

background-position: right;
background-repeat: repeat-y;
}
background-position: bottom left;
background-repeat: no-repeat;
}
background-position: bottom;
background-repeat: repeat-x;
}
background-position: bottom right;
background-repeat: no-repeat;
}

}
</style>
<body>
<tr>
<td colspan=2 rowspan=2 class="content">dynamic content goes here</td>
<td class="topright" width=7 height=7><img src="images/spacer.png"></td>
</tr>
<tr>
<td class="right"><img src="images/spacer.png"></td>
</tr>
<tr>
<td class="bottomleft" height=7 width=7><img src="images/spacer.png"></td>
<td class="bottom"><img src="images/spacer.png"></td>
<td class="bottomright" height=7 width=7><img src="images/spacer.png"></td>
</tr>
</table>
</body>```

10. Registered User
Join Date
Jul 2007
Posts
219
Originally Posted by zaxnyd

It's great for static-sized shadows. But I'm looking to make a dynamic sized one.
But that is for dynamically sized shadows: you resize the background image based on the size of the image you're placing.

If you read the source material (linked toward the top of the article I linked you to) it states that the shadow image is actually 800x800, resized as needed.

Simple solutions are more often the most effective. :]

11. Registered User
Join Date
Jul 2007
Posts
9
That's an alternative which I'll definitely consider. Thanks.

However, I'd still like to accomplish my proposed layout.

12. Registered User
Join Date
Jul 2007
Posts
9
Still no luck on my end. Any more suggestions? =\

13. Registered User
Join Date
Jul 2007
Posts
9

## Solved.

14. Registered User
Join Date
Jul 2007
Posts
219
Originally Posted by zaxnyd

Nicely done. If you notice, that page uses the link I provided as one of it's sources later on in the article. :P

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•

"

"

## X vBulletin 4.2.2 Debug Information

• Page Generation 0.16654 seconds
• Memory Usage 2,983KB
• Queries Executed 13 (?)
Template Usage (34):
• (3)bbcode_code
• (6)bbcode_quote
• (1)footer
• (1)forumjump
• (1)forumrules
• (1)gobutton
• (14)memberaction_dropdown
• (1)navbar
• (1)navbar_moderation
• (1)navbar_noticebit
• (1)navbar_tabs
• (2)option
• (14)postbit
• (14)postbit_onlinestatus
• (14)postbit_wrapper
• (1)spacer_close
• (1)spacer_open
• (1)tagbit_wrapper

Phrase Groups Available (6):
• global
• inlinemod
• postbit
• posting
• reputationlevel
Included Files (26):
• ./global.php
• ./includes/class_bootstrap.php
• ./includes/init.php
• ./includes/class_core.php
• ./includes/config.php
• ./includes/functions.php
• ./includes/class_friendly_url.php
• ./includes/class_hook.php
• ./includes/class_bootstrap_framework.php
• ./vb/vb.php
• ./vb/phrase.php
• ./includes/functions_calendar.php
• ./includes/functions_bigthree.php
• ./includes/class_postbit.php
• ./includes/class_bbcode.php
• ./includes/functions_reputation.php
• ./includes/functions_notice.php
• ./packages/vbattach/attach.php
• ./vb/types.php
• ./vb/cache.php
• ./vb/cache/db.php
• ./vb/cache/observer/db.php
• ./vb/cache/observer.php

Hooks Called (70):
• init_startup
• friendlyurl_resolve_class
• init_startup_session_setup_start
• database_pre_fetch_array
• database_post_fetch_array
• init_startup_session_setup_complete
• global_bootstrap_init_start
• global_bootstrap_init_complete
• cache_permissions
• fetch_foruminfo
• global_state_check
• global_bootstrap_complete
• global_start
• style_fetch
• global_setup_complete
• strip_bbcode
• friendlyurl_clean_fragment
• friendlyurl_geturl
• forumjump
• cache_templates
• cache_templates_process
• template_register_var
• template_render_output
• fetch_template_start
• fetch_template_complete
• parse_templates
• notices_check_start
• notices_noticebit
• process_templates_complete
• friendlyurl_redirect_canonical
• bbcode_fetch_tags
• bbcode_create
• postbit_factory
• postbit_display_start
• postbit_imicons
• bbcode_parse_start
• bbcode_parse_complete_precache
• bbcode_parse_complete
• postbit_display_complete
• memberaction_dropdown
• tag_fetchbit_complete
• forumrules
• navbits
• navbits_complete