controls in grid layout render incorrectly in firefox

G

Guest

I am designing a web page using VS2003 ASP.NET. The page contains various
DIVs (panels), one of which is in grid layout. The controls in this DIV
render correctly in IE, but when using Firefox they are incorrectly
positioned. VS sets the positioning of the controls to absolute, and because
the DIV is to the right of another DIV Firefox (correctly, I suspect)
positions the controls absolutely, which means they are too far to the left,
while IE (and VS design) seems to position them relative to the DIV even
though they are set as absolute. I have tried changing the positioning to
relative manually in the HTML view, but VS just changes it back to absolute
whenever I reposition the controls in design view.
Does this make sense, and can anyone tell me what to do about it? Obviously
I need the page to render correctly in all browsers.
 
J

Jim Suruda

Dave-

Grid layout is not correctly supported by all browsers, so it's probably
best to use FlowLayout if you might have users who don't use IE.

In design view, find the properties for your page, and set the pageLayout
property to FlowLayout, and then strip out any preexisting positioning
from the HTML of your aspx page.

Jim
 
G

Guest

The pagelayout of the page is already set to FlowLayout. There is only one
one panel that is set to GridLayout. I couldn't find a way to change the
layout of this panel in design view, so I changed it to FlowLayout in HTML
view (MS_POSITIONING="FlowLayout"). Howeverit has had no effect at all on the
layout in either IE or Firefox (or VS for that matter).
Am I correct in thinking that the MS_POSITIONING tag is used only by VS and
ignored by browsers?
I have tried to reporduce the problem in a simpler HTML file but I can't.
Could it be something to do with the asp controls and the way they are
rendered by Firefox?
--
Dave


Jim Suruda said:
Dave-

Grid layout is not correctly supported by all browsers, so it's probably
best to use FlowLayout if you might have users who don't use IE.

In design view, find the properties for your page, and set the pageLayout
property to FlowLayout, and then strip out any preexisting positioning
from the HTML of your aspx page.

Jim
 
G

Guest

Further to my previous reply, it is not an ASP problem. I have manged to
reproduce the problem with a simple HTML file, as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>Layout test</title>
</HEAD>
<body>
<div>
<div style="WIDTH: 135px; HEIGHT: 272px; float: left;">
<P>This is text in the left hand column which is flow layout.</P>
</div>
<DIV style="WIDTH: 592px; POSITION: relative; HEIGHT: 256px"
MS_POSITIONING="GridLayout">
<DIV style="DISPLAY: inline; Z-INDEX: 101; LEFT: 16px; WIDTH: 232px;
POSITION: absolute; TOP: 8px; HEIGHT: 38px" ms_positioning="FlowLayout">
This is a text box in the right hand column which is grid layout.
</DIV>
</DIV>
</div>
</body>
</HTML>

If anyone can explain why this renders differently in IE and Firefox (I
hesitate to categorise either as being 'correct') I would like to know. (NB
Opera renders it as intended, ie. the same as IE).
--
Dave


Jim Suruda said:
Dave-

Grid layout is not correctly supported by all browsers, so it's probably
best to use FlowLayout if you might have users who don't use IE.

In design view, find the properties for your page, and set the pageLayout
property to FlowLayout, and then strip out any preexisting positioning
from the HTML of your aspx page.

Jim
 

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,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top