datagrid with scrollbar browser compatibility problem

G

Goffin

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
 
R

Ryan Ternier

Goffin said:
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
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
 
G

Goffin

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.
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top