Matching up text in 2 different columns in a table?
Posted
by user297663
on Stack Overflow
See other posts from Stack Overflow
or by user297663
Published on 2010-03-19T21:58:25Z
Indexed on
2010/03/19
22:01 UTC
Read the original article
Hit count: 168
Hey guys, I have recently been working on a pastebin script (for fun) and I've come across a problem that I can't seem to solve in CSS. I have a table with 2 columns. 1 column is used to display the line numbers and the 2nd column is used to display the code. I can't seem to get the numbers match up with the lines in the code so it looks all weird (example: www.zamnproductions.com/paste.php?id=32). Take a look at my code (the snippet):
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
td.num { vertical-align: top; } td.numbers { display:table-cell; padding:1px; vertical-align: top; line-height:25px; } td.code { display:table-cell; vertical-align: top; line-height:20px; } #hide { display:none; } #leftcontent { position: absolute; left:10px; top:119px; width:200px; background:#fff; border:0px solid #000; } #centercontent { background:#fff; margin-left: 199px; margin-right:199px; border:0px solid #000; voice-family: "\"}\""; voice-family: inherit; margin-left: 201px; margin-right:201px; } html>body #centercontent { margin-left: 202px; margin-right:201px; }
Here is the part where the table is made:
listNumbers($_GET['id']); ?> viewCode($_GET['id']); ?>
© Stack Overflow or respective owner