datagrid with scrollbar browser compatibility problem

Discussion in 'ASP .Net' started by Goffin, Aug 4, 2005.

  1. Goffin

    Goffin Guest

    Hey

    I have an asp.net datagrid width a scrollbar. This scrollbar is placed
    using a div-tag around the grid with a style property
    overflow:scrolling, a width an a height. This works very well in
    Internet Explorer. But when I view the result in Mozilla Firefox, then
    there is no scrollbar visible, it show the whole grid. This is not the
    result I want.

    Has someone had the same problem and can give me an answer?

    Greets
     
    Goffin, Aug 4, 2005
    #1
    1. Advertisements

  2. Goffin

    Ryan Ternier Guest

    The main problem is that IE isn't standards compliant (well.. not as
    much as FireFox). That is the downfall of IE.

    But seeing a Web Developer needs to cater to both those using IE and
    those using FireFox you have to be tricky with your Styles.

    Use the _ Hack with IE.

    so

    ..MyClass
    {
    width:40px;
    _width:35px;
    }

    FireFox will use the 40px width, IE will use the 35px. IE ignores the _
    where FireFox discards it.

    make sure to set the height of the Div.

    /RT
     
    Ryan Ternier, Aug 4, 2005
    #2
    1. Advertisements

  3. Goffin

    Goffin Guest

    Thanks for the post, but my problem was that I had placed the style
    property in a seperate CSS-file, when I placed it with my HTML-code, my
    scrollbar appeared in firefox as well as in IE.

    Why I don't no.
     
    Goffin, Aug 5, 2005
    #3
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.