tick marks

Discussion in 'ASP .Net' started by Martin Eyles, Sep 6, 2005.

  1. Martin Eyles

    Martin Eyles Guest

    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>

    --
    Martin Eyles
    Martin Eyles, Sep 6, 2005
    #1
    1. Advertising

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

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



    "Martin Eyles" wrote:

    > 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>
    >
    > --
    > Martin Eyles
    >
    >
    >
    >
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=, Sep 6, 2005
    #2
    1. Advertising

  3. Martin Eyles

    Martin Eyles Guest

    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

    --
    Martin Eyles


    "Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
    news:...
    > with a 0 height it would be invisible/hidden otherwise.
    > use a 1 height and try again.
    >
    > --
    > Curt Christianson
    > site: http://www.darkfalz.com
    > blog: http://blog.darkfalz.com
    >
    >
    >
    > "Martin Eyles" wrote:
    >
    > > 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>
    > >
    > > --
    > > Martin Eyles
    > >
    > >
    > >
    > >
    Martin Eyles, Sep 6, 2005
    #3
  4. 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



    "Martin Eyles" wrote:

    > 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
    >
    > --
    > Martin Eyles
    >
    >
    > "Curt_C [MVP]" <software_at_darkfalz.com> wrote in message
    > news:...
    > > with a 0 height it would be invisible/hidden otherwise.
    > > use a 1 height and try again.
    > >
    > > --
    > > Curt Christianson
    > > site: http://www.darkfalz.com
    > > blog: http://blog.darkfalz.com
    > >
    > >
    > >
    > > "Martin Eyles" wrote:
    > >
    > > > 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>
    > > >
    > > > --
    > > > Martin Eyles
    > > >
    > > >
    > > >
    > > >

    >
    >
    >
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=, Sep 6, 2005
    #4
  5. Martin Eyles

    Jon Paal Guest

    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


    "Martin Eyles" <> wrote in message
    news:...
    > 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>
    >
    > --
    > Martin Eyles
    >
    >
    >
    Jon Paal, Sep 6, 2005
    #5
  6. Martin Eyles

    Martin Eyles Guest

    "Curt_C [MVP]" <software_at_darkfalz.com> wrote
    > 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).

    --
    Martin Eyles
    Martin Eyles, Sep 7, 2005
    #6
  7. Martin Eyles

    Martin Eyles Guest

    "Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote in message
    news:Opv$...
    > 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.

    --
    Martin Eyles
    Martin Eyles, Sep 7, 2005
    #7
  8. 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
    -------------------------------------------------------



    "Martin Eyles" <> wrote in message
    news:...
    > "Jon Paal" <Jon nospam Paal @ everywhere dot com> wrote in message
    > news:Opv$...
    > > 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.
    >
    > --
    > Martin Eyles
    >
    >
    >
    Alvin Bruney - ASP.NET MVP, Sep 7, 2005
    #8
  9. Martin Eyles

    Martin Eyles Guest

    "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
    news:...
    > 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.

    --
    Martin Eyles
    Martin Eyles, Sep 13, 2005
    #9
  10. Martin Eyles

    Martin Eyles Guest

    Discovered an annoyingly simple fix for internet explorer.

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

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

    --
    Martin Eyles


    "Martin Eyles" <> wrote in message
    news:...
    > "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
    > news:...
    > > 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.
    Martin Eyles, Sep 13, 2005
    #10
  11. 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
    -------------------------------------------------------



    "Martin Eyles" <> wrote in message
    news:...
    > "Alvin Bruney - ASP.NET MVP" <www.lulu.com/owc> wrote in message
    > news:...
    > > 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.
    >
    > --
    > Martin Eyles
    >
    >
    >
    Alvin Bruney - ASP.NET MVP, Sep 13, 2005
    #11
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bruce W.1

    Kill the tick sound on refresh?

    Bruce W.1, Feb 2, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    763
    charles
    Feb 3, 2004
  2. John
    Replies:
    5
    Views:
    1,788
    OHM \( One Handed Man \)
    Apr 15, 2006
  3. WindAndWaves

    tick the boxes

    WindAndWaves, Nov 23, 2004, in forum: HTML
    Replies:
    1
    Views:
    2,058
    Mark Parnell
    Nov 23, 2004
  4. graphicsxp

    update gridview on checkbox tick/untick

    graphicsxp, Jul 12, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,049
    S. Justin Gengo
    Jul 12, 2006
  5. kloppie
    Replies:
    0
    Views:
    628
    kloppie
    Mar 13, 2007
Loading...

Share This Page