473,765 Members | 1,956 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

CSS in tables - tricky vertical align problem

I'm trying to make some "sub-cells" in an HTML table and to control
their positioning and content presentation via CSS. In the table at
the following URL:

https://fshn3152.foods.uiuc.edu/~fgasper/erf.html

what I'm immediately trying to do is vertically position the text and
checkboxes in all four "Statement Date" sub-cells (created with <span>
elements).

I've tried "vertical-align", but that only has to do with block-level
stuff positioned in inline-level stuff; this is pretty well the other
way around. Any ideas?

Don't reply to the e-mail address; I never check it.
Jul 20 '05 #1
2 6178
fg*****@sbcglob al.net (Felipe Gasper) wrote:
I'm trying to make some "sub-cells" in an HTML table and to control
their positioning and content presentation via CSS. In the table at
the following URL:

https://fshn3152.foods.uiuc.edu/~fgasper/erf.html
"- The server's name "fshn3152.foods .uiuc.edu" does not match the
certificate's name "". Somebody may be trying to eavesdrop on you.
- The certificate for "IT, Urbana" is signed by the unknown
Certificate Authority "IT, Urbana". It is not possible to verify
that this is a valid certificate"
what I'm immediately trying to do is vertically position the text and
checkboxes in all four "Statement Date" sub-cells (created with <span>
elements).

I've tried "vertical-align", but that only has to do with block-level
stuff positioned in inline-level stuff; this is pretty well the other
way around. Any ideas?


vertical-align applis to two cases:
1. aligning relative to the text baseline within an inline element (I
think this is what you were trying to describe above, but as block
level elements don't go inside inline elements your description really
doesn't make sense).
2. aligning relative to the table row baseline within table cells.

The second use may be of some help to you: apply the vertical-align
property to the td not to the contained spans.
Failing that apply padding and margin to achieve the layout you want.

Or, considering that you've decided that this form is sufficiently
table-like to be a table, why not use a nested table for the nested
options?

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #2
On Fri, 16 Jan 2004, Steve Pugh wrote:
https://fshn3152.foods.uiuc.edu/~fgasper/erf.html
"- The server's name "fshn3152.foods .uiuc.edu" does not match the
certificate's name "". Somebody may be trying to eavesdrop on you.
- The certificate for "IT, Urbana" is signed by the unknown
Certificate Authority "IT, Urbana". It is not possible to verify
that this is a valid certificate"


This is a testing server, and we haven't gotten an actual SSL cert yet. My
apologies; I should have sent out the link as a regular http URL.
vertical-align applis to two cases:
1. aligning relative to the text baseline within an inline element (I
think this is what you were trying to describe above, but as block
level elements don't go inside inline elements your description really
doesn't make sense).
That's it, yes. Thanks for the correction.
2. aligning relative to the table row baseline within table cells.

The second use may be of some help to you: apply the vertical-align
property to the td not to the contained spans.
But doesn't this apply directly to the td, then, not to the td's contents?
Failing that apply padding and margin to achieve the layout you want.
Hmm - I tried adding "padding-top: auto; padding-bottom: auto" as a style
element to one of the spans, but this did nothing. I suppose I could see
if there's a DOM property to return the height of an element and use that
to position things, but that's pretty ugly.

Or, considering that you've decided that this form is sufficiently
table-like to be a table, why not use a nested table for the nested
options?
I'm trying that now, actually, since <th> does the valign automagically.
Unforunately I can't seem to access the width of the nested table cells
from JavaScript....a m I missing something?

-Felipe Gasper

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>


-----------------------
Felipe M. L. M. Gasper
http://fgmusic.org

Judge ideas, not people.
Love people, not ideas.

Freedom from Micro$oft: http://openoffice.org
Join the revolution.
Jul 20 '05 #3

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

Similar topics

8
30910
by: abracad | last post by:
Hi Is it possible to vertically align an image in the middle of a DIV of fixed height?
10
66046
by: Markus Ernst | last post by:
Hi I have a strange problem with vertical-align. The case can be viewed at http://www.brainput.info/geschichte.html. HTML code: <div id="bild"><img src="geschichte.gif" width="274" height="29" alt="Wir schreiben die Geschichte Ihres Unternehmens."></div>
11
12323
by: Ben Holness | last post by:
Hi all, I am having some trouble with some table code. It works fine in Internet Explorer, but the layout doesn't work correctly in Firefox 1.0.7 Is this a firefox bug, or am I missing something in the HTML? It is pretty simple code! (Plus it is valid according to the w3c validator) The layout problem is in the third row. I cannot get the embedded table (with the top and bottom cells) to be the full height of the cell (unless
10
9208
by: Luke | last post by:
Hi. I am trying to make correct layout, here is an example of (dynamically generated content via jsp): http://localhost/www/layout.htm Most outer div is positioned absolute (if not then it will not grow when content inside div.body is greater than width of window of user agent), anyway anyone knowlegable can see it in sources...
5
4825
by: Markus Ernst | last post by:
Hello This is a test example: http://www.markusernst.ch/anthracite/ http://www.markusernst.ch/anthracite/living_divani.html After googling and experimenting for several hours, I ended up doing this demo with tables. The main problems are the vertical centering of the info area, and of the text inside the squares.
3
4422
by: acunnon | last post by:
I am trying to put together an login page my problem is getting the three items aligned to the middle verticaly without specifing a height to anything on the page. CSS html{ height:100%; min-height:100%; } body{ vertical-align:middle;
1
2561
by: cma6 | last post by:
I have a page which uses tables for layout http://www.vintagetextile.com/1920s_to_1930s.htm The checkerboard pattern is achieved with this markup: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>1920s to 1930s high-style Vintage Clothing at Vintage Textile</title>
8
3553
by: ayamopamo | last post by:
Hi- I am trying to center a web page. It seems like this should be very simple to do, but apparently it isn't my day. I have successfully centered the background by calling it in the css body tag: body { font-family: Trebuchet MS, Arial; cursor : default; background:#000000 url("Images/long-template.jpg"); background-repeat:no-repeat; background-position: center; background-attachment:scroll; height: 1228px;
15
1726
by: Peter | last post by:
I have the following web page and I am trying to have the Field lables NOT to wrap. It looks fine in a designer but when I run the program in a browser the lables that have a space wrap. How do I prevent this? Also, is there a better way to design an data entry web page without using tables, (it's a realy paint in you know what to do that with tables), but I don't know how to line up the fields any other way. Thank You
0
9568
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10161
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9955
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8831
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5421
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.