Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 06-28-2004, 12:06 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default TD - vertical alignment top AND bottom?

I got the following problem and haven't found a (good working) solution:

Let's say there is a table cell (td). Within this cell, I have two div elements.

The first one should be aligned ad the top of the cell, the second one at the bottom.

Any idea how this could be done?
Reply With Quote
  #2  
Old 06-28-2004, 12:15 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Vertical alignment is not easy to do in CSS - easier in Table layouts (bad Natch, bad Natch!) ...

Try
Code:
<td>

<div valign="top" style="height="50%">
</div>

<div valign="bottom" style="height="50%">
</div>

</td>
Reply With Quote
  #3  
Old 06-28-2004, 01:09 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Doesn't work at alll.

- DIV tags don't have a valign-attribute.
- the style definition is invalid

So I modified the code:

Code:
 
<td>

<div style="height: 50%; vertical-align: top">
</div>

<div style="height: 50%; vertical-align: bottom">
</div>

</td>
But still doesn't work.
Reply With Quote
  #4  
Old 06-28-2004, 03:06 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

'scuse me for being tired
Reply With Quote
  #5  
Old 07-09-2004, 03:45 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*bump*

HTML Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
<title>Just a test</title>
</head>
<body>
<table border="1" style="height: 1px">
<tr>
<td>
some<br>
longer<br>
content<br>
here<br>
in this<br>
cell<br>
</td>
<td>
<table width="100%" style="height: 100%" border="0">
<tr>
<td valign="top">this should be at top</td>
</tr>
<tr>
<td valign="bottom">this should be at bottom</td>
</tr>
</table>
</td>
</tr>
<tr style="height: 10px">
<td colspan="2">
</td>
</tr>
<tr>
<td>
some<br>
longer<br>
content<br>
here<br>
in this<br>
cell<br>
</td>
<td valign="top">
<table width="100%" style="height: 100%" border="0">
<tr>
<td valign="top">this should be at top</td>
</tr>
<tr>
<td valign="bottom">this should be at bottom</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Can somebody enlighten me why this does not seem to work with the Gecko-Engine?
How could I get it working?
Attached Images
File Type: png opera.png (4.0 KB, 0 views)
File Type: png firefox.png (4.1 KB, 0 views)
File Type: png ie.png (3.0 KB, 0 views)
Reply With Quote
  #6  
Old 07-18-2004, 12:23 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*bump*

I'd really need a solution for this ...

Anyone?
Reply With Quote
  #7  
Old 07-18-2004, 09:55 AM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Why not use CSS Positioning to work out your problem. Check this link -> http://www.w3.org/TR/REC-CSS2/visure...ed-positioning
Reply With Quote
  #8  
Old 07-18-2004, 10:23 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm ... can you give an example on how to use this?
I can't seem to get it working

If I create two divs with
  • position: fixed; top: 0px
  • position: fixed; bottom: 0px
within the cell, they they will be at top and bottom of the screen (in Firefox), or both at top of the cell (in IE).

Same for position: absolute
Reply With Quote
  #9  
Old 07-18-2004, 10:36 AM
Dark_Wizard Dark_Wizard is offline
 
Join Date: Nov 2001
Location: North Carolina
Posts: 1,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmmm...let me play with this a bit & get back to you.
Reply With Quote
  #10  
Old 07-18-2004, 10:46 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:11 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07017 seconds
  • Memory Usage 2,277KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)bbcode_html
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (3)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete