473,472 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

CSS alignment

2 New Member
hi..
I am stuck up with a problem in css.. can any of u help me out.

i have a page where i need alignment like the below

(existing scenario)

subtotal : $100

shipping & handling : $500
--------------------------------------------------------

the problem i have is.. the dashed line u can see must be have width according the maximum text above. in this case.. the width it must have is according to the shipping

so the scenario as to be like

subtotal : $100

shipping & handling : $500

--------------------------------------


the code i have written is as follows:
<html>
<head>
<style>
.ryp_summaryPadding {padding-top:10px;padding-bottom:10px}
.ryp_summaryAlign {background-color:#fff; padding-top:5px; padding-right:5px;
margin-right:5px; margin-left:625px; padding-bottom:10px; padding-left:15px}
.summary_sep {border-style:solid none none; border-width:5px;border-color:#eeeef8;
margin-top:10px; clear:both;width:inherit;}
.summary_rowAlign {float:right; text-align:right; padding:2px; clear:right;
margin-top:-15px}
.summary_leftAlign {position:relative; right:90px; top:15px; white-space:nowrap}
.summary_rightAlign {position:relative; right:10px; white-space:nowrap}
</style>
</head>
<body>

<div class="ryp_summaryPadding">
<div class="ryp_summaryAlign">
<div class="summary_textfontnormal">

<div class="summary_rowAlign">
<span class="summary_leftAlign">Shipping &amp; handling:</span>
<span class="summary_rightAlign"><div>GBP 232.00</div></span>
</div>

<div class="summary_rowAlign">
<span class="summary_leftAlign">Tax:</span>
<span class="summary_rightAlign"><div>GBP 12.00</div></span>
</div>

<div class="summary_rowAlign">
<span class="summary_leftAlign">Seller discounts (-) or charges (+):</span>
<span class="summary_rightAlign"><div>GBP 2.00</div></span>
</div>
<br/>
<div class="summary_rightAlign">
<div class="summary_sep"></div>
</div>

</div></div></div>

</body>
</html>

can u tell me the possible solution please ........
Jun 8 '07 #1
1 1343
Vito Vega
3 New Member
hi..
I am stuck up with a problem in css.. can any of u help me out.

...

the problem i have is.. the dashed line u can see must be have width according the maximum text above. in this case.. the width it must have is according to the shipping
If I'm reading this right, you can't do it with just CSS and HTML. You'll need some JavaScript or PHP or whatever, to count the length of the string (the shipping, in your example), and then format the dashed line accordingly.
Jun 11 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: Shashi | last post by:
Can somebody explain how the byte alignment for structures work, taking the following example and considering: byte of 1 Byte word of 2 Bytes dword of 4 Bytes typedef struct { byte a; word...
10
by: j0mbolar | last post by:
for any pointer to T, does a pointer to T have different or can have different alignment requirement than a pointer to pointer to T? if so, where is the exact wording in the standard that would...
67
by: S.Tobias | last post by:
I would like to check if I understand the following excerpt correctly: 6.2.5#26 (Types): All pointers to structure types shall have the same representation and alignment requirements as each...
7
by: Earl | last post by:
Any known fixes for the wacky right-alignment bug in the WinForms datagrid (VS2003)? I've tried Ken's workaround...
13
by: aegis | last post by:
The following was mentioned by Eric Sosman from http://groups.google.com/group/comp.lang.c/msg/b696b28f59b9dac4?dmode=source "The alignment requirement for any type T must be a divisor of...
12
by: Yevgen Muntyan | last post by:
Hey, Consider the following code: #include <stdlib.h> #define MAGIC_NUMBER 64 void *my_malloc (size_t n) { char *result = malloc (n + MAGIC_NUMBER);
10
by: haomiao | last post by:
I want to implement a common list that can cantain any type of data, so I declare the list as (briefly) --------------------------------------- struct list { int data_size; int node_num;...
55
by: fishpond | last post by:
How to declare a variable guaranteed to have the strictest possible alignment? -- The defense attorney was hammering away at the plaintiff: "You claim," he jeered, "that my client came at you...
2
by: somenath | last post by:
Hi All, I have one question regarding the alignment of pointer returned by malloc. In K&R2 page number 186 one union is used to enforce the alignment as mentioned bellow. typedef long...
2
by: uamusa | last post by:
I am Dynamically generating a proposal(report) in MS Word. By default the Paragraph Alignment is "Left". For the First 6 Paragraphs I set the Alignment to "Center", and then when attempting to...
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
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...
1
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.