473,396 Members | 1,772 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Is there an equivalent of valign="bottom" for a table within a DIV using CSS?

Is there an equivalent of valign="bottom" for a table within a DIV
using CSS?

I've found I can center a table of buttons in a DIV with
{margin-left:auto; margin-right:auto}. But I am unsure how to get this
table to sit at the bottom of the DIV.

Example code follows, or see
http://home.exetel.com.au/tas/valign/test01.html

p.s. If there is a better way than using a table to line up the button
images in CSS, I'd love to know.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Test01</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style>
body {
background-color:#ffcc00;
}
div#logo {
float:left;
height:91px;
width:135px;
background-color:#d0d2be;
}
div#sitemenu {
float:left;
height:91px;
width:407px;
background-color:#e0d2be;
}
div#sitemenu table {
margin-left:auto;
margin-right:auto;
}
div#sitemenu table td {
padding-left:10px;
padding-right:10px;
}
div#emailjoin {
float:left;
height:91px;
background-color:#f0d2be;
}
</style>
</head>

<body>

<div id="logo">
<p>logo</p>
</div>

<div id="sitemenu">
<table>
<tr>
<td>btn1</td>
<td>btn2</td>
<td>btn3</td>
</tr>
</table>
</div>

<div id="emailjoin">
<p>join our emailing list</p>
</div>

</body>
</html>

Jan 31 '06 #1
2 12173
Tasman wrote:

I've found I can center a table of buttons in a DIV with
{margin-left:auto; margin-right:auto}. But I am unsure how to get this
table to sit at the bottom of the DIV.

Add "height: 100%" to "div#sitemenu table".
Add "vertical-align: bottom" to "div#sitemenu table td".

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jan 31 '06 #2

Jim,

I tested your solution in IE6 & FF1.5 on WinXP, and it works well.

Many thanks!

The updated sample file is available at:
http://home.exetel.com.au/tas/valign/test02.html

Tasman

Jim Moe wrote:
Tasman wrote:

I've found I can center a table of buttons in a DIV with
{margin-left:auto; margin-right:auto}. But I am unsure how to get this
table to sit at the bottom of the DIV.

Add "height: 100%" to "div#sitemenu table".
Add "vertical-align: bottom" to "div#sitemenu table td".

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


Feb 1 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: mike | last post by:
regards: I use Jtidy (api) to translate a HTML file into a "XHTML file". But The "XHTML file" cannot be identified by nokia 6600. Do I miss something important? Or this is Jtidy's weakness or...
1
by: Allen | last post by:
I am trying to add an additional photo/hyperlink to the company web site (I didn't create it) without any luck. The mouseover feature 'highlights' pics by swapping them with another pic using this...
0
by: Sean Berry | last post by:
This is the page in question
2
by: Sean Berry | last post by:
Here is the page in question http://www.aquaticwhirlpools.com/v2/ The cell to the right, with "sitemap" and the dropdown menu will not align to the bottom in IE in windows. It works in all...
4
by: timmy | last post by:
I have a table with a cell on the bottom right with an image to create a rounded corner effect: <table cellpadding="0" cellspacing="0" border="1"> <tr><td rowspan="2">asdfsadf</td> <td...
0
by: ward | last post by:
Greetings. Ok, I admit it, I bit off a bit more than I can chew. I need to complete this "Generate Report" page for my employer and I'm a little over my head. I could use some additional...
9
by: Tristán White | last post by:
Hi I am very new to PHP - actually, this is my second day at it, as I've only recently started a new job last week. We're a charity. I have a "No input file selected" problem. A Google search...
3
by: blackrunner | last post by:
ERROR in my Query?! ERROR: Element GESCHLECHT is undefined in FORM. i think everything ok. Maby somebody can help me here Element GESCHLECHT is undefined in FORM. The error occurred...
1
by: chrisj | last post by:
I'm using freeASPupload and got some assistance integrating to a Member script. It works successfully. In this modified version there are two groups that use this upload script. Members of one...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.