473,403 Members | 2,270 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,403 software developers and data experts.

CSS Table Replacement Question

Hi,

Hopefully someone can help with my little problem. I am looking to
have replace a common table but am having trouble with the alignment.

I want to have 2 "columns" of information held within the parent <div>
as follows:

--------------------
| col1 col2|
| |
| col1 col2|
| col1 col2|
| col1 col2|
--------------------

What I am getting is the following:

--------------------
| col1col2 |
| |
| col1col2 |
| col1col2 |
| col1col2 |
--------------------

I am using the following code where col1 = .label and col2=.data

<html>
<style>
#Hrs2 { position:absolute; left:1; top:15; width:200;
background-color:white; font-size: 11px; color: #333366;
padding:5px;border: 1px solid #333366; text-align: left; z-index:52; }

#Hrs2 .label {font-size: 11px; color: #666666; font-weight:
normal; text-align: right; display:inline;}
#Hrs2 .data {font-size: 11px; color: #990000; font-weight:
bold; text-align: right; display:inline; position:relative;}
#Hrs2 .monthLabel {font-size: 12px; color: #666666; font-weight:
bold; margin: 5px, 0px, 5px, 0px;}

</style>
<body>
<div id="Hrs2">
<div class="label">Total for 2004-04-10 :</div>
<div class="data">12.25</div>
<div class="monthLabel">June Information:</div>
<div class="label">Expected :</div>
<div class="data">200</div>
<div></div>
<div class="label">minus Worked :</div>
<div class="data">150.00</div>
<hr>
<div class="label">Balance :</div>
<div class="data">50.25</div>
</div>
</body>
</html>

Thanks in advance.

Dave
Jul 20 '05 #1
1 2941
Dave wrote:
Hi,

Hopefully someone can help with my little problem. I am looking to
have replace a common table but am having trouble with the alignment. <div class="label">Total for 2004-04-10 :</div>
<div class="data">12.25</div>
<div class="monthLabel">June Information:</div>
<div class="label">Expected :</div>
<div class="data">200</div>
<div></div>
<div class="label">minus Worked :</div>
<div class="data">150.00</div>
<hr>
<div class="label">Balance :</div>
<div class="data">50.25</div>


This is tabular data. Use a <table>. <table>s are only evil when used
for layout; they are the correct element for presenting tabular data.

Your proposed solution replaces the perfectly good table with a hideous
<div> hack that is inappropriate. What happens if the user's UA doesn't
have CSS support?

--
Mark.
Jul 20 '05 #2

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

Similar topics

5
by: Paul Miller | last post by:
We've run into minidom's inabilty to handle large (20+MB) XML files, and need a replacement that can handle it. Unfortunately, we're pretty dependent on a DOM, so a pulldom or SAX replacement is...
3
by: J Trost | last post by:
I was wondering if anyone knows if it is possible to do basic string replacement using XSLT even though the strings being replaced may contain "<" and ">". Here is my problem: I need to be able...
3
by: Vibha Tripathi | last post by:
Hi Folks, I put a Regular Expression question on this list a couple days ago. I would like to rephrase my question as below: In the Python re.sub(regex, replacement, subject)...
5
by: Michael G. Scott | last post by:
In VC6, I used Ctrl+Shift+F8 (Table.ColumnSelect) all the time, to select the characters in the same column locations in multiple rows all the time. This doesn't work in .NET, and I haven't found...
2
by: Roy | last post by:
Hey all, Quick question here. Within VS.NET there are various tags such as <asp:Table>, <asp:TableCell>, etc... which can be used in lieu of <Table>, <td>, etc... Why do such replacement tags...
10
by: Trevor | last post by:
Hey, I am trying to do this tutorial on the microsoft site : http://msdn.microsoft.com/library/default.asp? url=/library/en-us/dndotnet/html/usingadonet.asp I can get everything to work up to...
11
by: sam_cit | last post by:
Hi Everyone, I have the following question regarding string replacement pre-processor statement, #define status "23" #define status "44" int main() {
4
by: Bob | last post by:
Hi all, I'm trying to import data, modify the data then insert it into a new table. The code below works fine for it but it takes a really long time for 15,000 odd records. Is there a way I...
1
by: =?ISO-8859-1?Q?S=F8ren?= | last post by:
Hi guys I got the following code: ------------------------------------------------------- Dim Word As New Microsoft.Office.Interop.Word.Application Dim Document As...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.