Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2007, 08:15 PM
SergioQ
Guest
 
Posts: n/a
Default Trying to show dollar value but superscript isn't enough

Hi all, am trying to show a dollar figure on my webpage, but defining
this for the cents value:

font-size: 80%;
vertical-align: super;

just isn't cutting it!

Is there a way to reduce the spacing before the decimal value, so I
canbring it closer to the dollar value?

Or does anyone know a better way to "neatly" do this using CSS or HTML
tags?

Many thanks,

Sergio

  #2  
Old February 27th, 2007, 09:05 PM
Jukka K. Korpela
Guest
 
Posts: n/a
Default Re: Trying to show dollar value but superscript isn't enough

Scripsit SergioQ:
Quote:
Hi all, am trying to show a dollar figure on my webpage, but defining
this for the cents value:
>
font-size: 80%;
vertical-align: super;
>
just isn't cutting it!
Exactly what are you trying to do? URL? You only posted two CSS
declarations, not even a rule. We need a URL of a complete example, with
HTML code and all.

Maybe you are looking for vertical-align: text-top.

Anyway, did you consider how the page works when your CSS rules are ignored?
If you don't have a decimal point, i.e. if you _rely_ on the special
rendering, then all your figures become 100 times bigger when CSS is turned
off...
Quote:
Is there a way to reduce the spacing before the decimal value, so I
canbring it closer to the dollar value?
Well, using letter-spacing, but not very well due to browser differences.
Setting a negative margin works better. But why would you do that?

If I guess correctly, the following might resemble what you want:

<style type="text/css">
ul { margin: 0; padding: 0; }
..sep { display: none; }
..c { font-size: 80%;
vertical-align: text-top; }
</style>

....

$4<span class="sep">.</span><span class="c">99</span>

It's rather awkward markup, but what can you do?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

  #3  
Old February 28th, 2007, 04:35 PM
Andreas Prilop
Guest
 
Posts: n/a
Default Re: Trying to show dollar value but superscript isn't enough

On Tue, 27 Feb 2007, SergioQ wrote:
Quote:
Hi all, am trying to show a dollar figure on my webpage, but defining
this for the cents value:
>
Or does anyone know a better way to "neatly" do this using CSS or HTML
tags?
$4.99
99¢

--
In memoriam Alan J. Flavell
http://groups.google.com/groups/sear...Alan.J.Flavell
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles