tick marks

M

Martin Eyles

Hi,
I want to make a scale on a graph, by telling asp to insert empty divs
of class tick, and the setting the style in css. I am trying to get a 3D
effect by using colored top and bottom borders on the divs, and setting
their height to 0. The code bellow show an example tick, and it all looks
beautiful in firefox, but in internet explorer, the height appears to be
ignored. Does anyone have any ideas?

Thanks,
Martin

<html>
<head>
<style>
..tick {border-top: 1px solid black; border-bottom: 1px solid red; width:
12px; height: 0px; padding: 0px; margin: 0px}
</style>
</head>
<body>
<div class="tick"></div>
</body>
</html>
 
G

Guest

with a 0 height it would be invisible/hidden otherwise.
use a 1 height and try again.
 
M

Martin Eyles

I want the tick marks' boxes to have no visible content, with just visible
borders. According to the css box model, the borders are added to the
height, so I want zero height (if I have 1px height, I will have top border,
1 pixel of background and bottom border).

Besides, the problem is not that I don't see it - it is that internet
explorer actually gives a height of about 20 pixels to the content.

Any other ideas?

Thanks,
ME
 
G

Guest

sounds like you are trying to do something that's probably better suited for
an image/graphic....

As for the height thing... did you try with a 1 as the height? Did it still
show the 20px height or did it show the 1px height? Just trying to see if the
# is the problem or the syntax around it.

--
Curt Christianson
site: http://www.darkfalz.com
blog: http://blog.darkfalz.com
 
J

Jon Paal

you may want to try a css group.

my experience is that css is notoriously inconsistent for backwards and
cross-browser displays.
unless you do a ton of css work and know all the nuances, prepare to invest
an enormous amount of time, or hire someone who has the skill in hand.

I agree with the suggestion of trying to use an image or a graphics control
to achieve the chart display
 
M

Martin Eyles

Curt_C said:
sounds like you are trying to do something that's probably better suited for
an image/graphic....

As for the height thing... did you try with a 1 as the height? Did it still
show the 20px height or did it show the 1px height? Just trying to see if the
# is the problem or the syntax around it.

I tried 1px and 2px, still got about 20px - I think it is asumming that
there will be text in there, and making sure the block is big enough. I
think I will have to use an image, which is a shame really (I don't like to
use too many, unless absolutely necesary).
 
M

Martin Eyles

Jon Paal said:
you may want to try a css group.

my experience is that css is notoriously inconsistent for backwards and
cross-browser displays.
unless you do a ton of css work and know all the nuances, prepare to invest
an enormous amount of time, or hire someone who has the skill in hand.

I know I mentioned testing in firefox, but that was just to make sure I
wasn't being completely stupid and misreading the css spec. It will only
actually have to work in internet explorer, as I am using an activex control
in the page (the graph itself is the activex control), and it is only being
used within closed environment with msie installed.
I agree with the suggestion of trying to use an image or a graphics control
to achieve the chart display

Thanks, I think that is what I will have to do.
 
A

Alvin Bruney - ASP.NET MVP

I'd recommend the Microsoft Office Web Components from Microsoft - it's free
for most charting use and provides Excel type charts. There are other
packages such as Dundas and ChartFX as well that are equally good but not
free.

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 
M

Martin Eyles

Alvin Bruney - ASP.NET MVP said:
I'd recommend the Microsoft Office Web Components from Microsoft - it's free
for most charting use and provides Excel type charts. There are other
packages such as Dundas and ChartFX as well that are equally good but not
free.

For a bar-graph, and tick marks? - That is just client-side overkill (not to
mention requiring activex, which I only want to use where necessary) - the
is no reason why HTML/CSS can't do this. I just wish that Internet Explorer
rendered properly.
 
M

Martin Eyles

Discovered an annoyingly simple fix for internet explorer.

<div><!-- --></div> is rendered correctly.

Don't know why adding comments works, but it does.
 
A

Alvin Bruney - ASP.NET MVP

either or, take your pick. You can't have both

--
Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Forth-coming VSTO.NET - Wrox/Wiley 2006
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

CSS menu 1
Menu Template Problem 1
Highlighting he current page 3
forcing new page in Stringbuilder 2
Height at 100% Not Working 1
Freeze Header Row 2
Data Entery Webpage with tables 11
Rollover in 2nd column 1

Top