By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,967 Members | 1,581 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,967 IT Pros & Developers. It's quick & easy.

controls in grid layout render incorrectly in firefox

P: n/a
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.
--
Dave
Dec 14 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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

On Wed, 14 Dec 2005, Dave wrote:
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.
--
Dave


Dec 14 '05 #2

P: n/a
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" wrote:
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

On Wed, 14 Dec 2005, Dave wrote:
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.
--
Dave


Dec 15 '05 #3

P: n/a
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" wrote:
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

On Wed, 14 Dec 2005, Dave wrote:
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.
--
Dave


Dec 15 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.