- This topic is empty.
March 9, 2014 at 12:56 pm #165198
I am currently studying PHP and I am trying to decimal-align contents appearing within <td> elements of two columns.
Perhaps a silly question, but I have thus far been unable to uncover a property even in CSS3 that would allow me to decimal align this content.
Any insight/help is greatly appreciated.
Thanks in advance.
Robert HiegerMarch 9, 2014 at 1:16 pm #165201
Do you use a monospaced font?March 9, 2014 at 5:50 pm #165220
No, I am using a proportionally-spaced font. Are you suggesting that this might be the problem?March 10, 2014 at 1:45 am #165237
Aligning stuff in a table is difficult enough as it is. Because characters in a monospace font have all the same width, this is what I end up using most of the time, … makes sense I think. Like here in this thing.March 10, 2014 at 3:14 am #165249Paulie_DMemberMarch 10, 2014 at 4:27 pm #165324
Thanks. If I am understanding the code correctly, you are using an <iframe> element and a mono-spaced font to achieve the effects in your codepen.
However, unfortunately, the CSS stylesheet is rendered (at least in codepen) as one continuous string with no white space. It is therefore quite difficult to decipher.
I am also concerned with using semantically appropriate HTML5. The data I wish to display is semantically appropriate to a table and not an iframe element.
Use of the mono-spaced font does make sense to me, however. Thanks again for your input. I will definitely examine your CSS and HTML code more closely.
Robert HiegerMarch 10, 2014 at 4:37 pm #165325
In the meantime, I will keep trying. To those setting the HTML5 and CSS standards, hopefully the message is getting out that it is high time that there is a standardized means of decimal alignment within tables. This would seem to be a rudimentary necessity for many a web site.March 10, 2014 at 4:55 pm #165326March 10, 2014 at 6:25 pm #165330
Thank you. Now that you’ve posted the link to the editor-view in Codepen, I will try to study the CSS, though at first glance, it looks as though this supersedes my current level of knowledge.
Not to worry, I’ll just continue studying–that is, both your example and the article linked by Paulie_D.
Surprising that this should be such a difficult problem, but then both CSS and HTML are full of tiny surprises.
Again, my thanks.
- The forum ‘CSS’ is closed to new topics and replies.