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

No members online now.

Forum statistics

Threads
473,997
Messages
2,570,239
Members
46,827
Latest member
DMUK_Beginner

Latest Threads

Top