469,326 Members | 1,613 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,326 developers. It's quick & easy.

ASP.NET 2.0 Gridview Control Rendering in Firefox

30
Have a page developed w/VWD which has a Gridview control. XHTML 1.0 Transitional Doctype. Tested in VWD OK and renders in IE7 as tested. When rendered with Firefox, the Gridview is shifted far to the right. It is set as absolute and it appears Firefox is not doing the position based upon the Left: setting. Fussed with different changes to page trying to figure this out to no avail. The view source from both browsers is practically identical. The "style=" w/ left: and width: and position: in the asp tag is identical as viewed by the browsers. I'm a newbie at this and it is driving me nuts. I assume the parms mentioned are suppose to control the position appearance on screen, but something is amiss.

Someone have a clue?

Thanks
Aug 4 '07 #1
11 8515
drhowarddrfine
7,435 Expert 4TB
The problem will be with IE, not Firefox, even though IE is showing you what you want. Can you show the html and css? Preferably a link.
Aug 5 '07 #2
HEX
30
The problem will be with IE, not Firefox, even though IE is showing you what you want. Can you show the html and css? Preferably a link.
Can't seem to reply. Getting error message about missing subject when adding page source info. I'm doing something wrong. Tryed code tags, etc.

Thanks.
Aug 5 '07 #3
HEX
30
The problem will be with IE, not Firefox, even though IE is showing you what you want. Can you show the html and css? Preferably a link.
Can't seem to reply. Getting error message about missing subject when adding page source info. I'm doing something wrong. Tryed code tags, etc. Also, an attached source file is too big to upload.

Thanks
Aug 5 '07 #4
drhowarddrfine
7,435 Expert 4TB
Well, obviously you are replying now. So I don't know why you can't enter the code along with your reply.
Aug 5 '07 #5
HEX
30
Well, obviously you are replying now. So I don't know why you can't enter the code along with your reply.

I get this on preview or submit if I add my source:

The following errors occurred when this message was submitted:
Please complete both the subject and message fields. Press the back button, correct the problem and try again.
The message you have entered is too short. Please lengthen your message to at least 20 characters.

Normal stuff ok.
Aug 5 '07 #6
MMcCarthy
14,534 Expert Mod 8TB
I get this on preview or submit if I add my source:

The following errors occurred when this message was submitted:
Please complete both the subject and message fields. Press the back button, correct the problem and try again.
The message you have entered is too short. Please lengthen your message to at least 20 characters.

Normal stuff ok.
I'm not sure whats happening but can I suggest you try attaching a txt file. If you post a reply and then edit it you should be able to add an attachment.
Aug 6 '07 #7
ak1dnar
1,584 Expert 1GB
Heya Hex,
May be the problem is, your contents for the post is too much. Thats why you can't post it in the thread.

Try to split to your codings in to several posts.

Hope this may help.
Aug 6 '07 #8
HEX
30
Thanks, that is probably the problem. Even an attached file was too big, so that is out also. Was attempting to send everything involved. So..., maybe an explanation of the issue clearly defined with just a piece of code at a time is sufficient.

The page in question is all ASP.NET 2.0 developed with VWD. The asp server controls all use the 'Style=' parm which states to use absolute position and gives a 'Left:' position, a 'Width' size and also a 'z-index'. These are supposed to dictate the position on the page, thus the prescribed appearance is rendered.
One of the controls(a Gridview) ends up shifted far to the right. The other controls are fine. Other pages work fine using similiar controls.

The server renders the control to the browser as a Table which contains the exact position from developed source as seen below.

<table cellspacing="0" cellpadding="1" align="Center" rules="cols" border="1" id="GridView1" style="width:467px;height:133px;font-weight:normal;font-size:11pt; color:Black;border-width:1px;border-style:solid;border-color:Tan; background-color:LightGoldenrodYellow;border-collapse:collapse;z-index: 119; left: 493px;
position: absolute; top: 170px; text-align: center; border-left-color: #0066ff; border-bottom-color: #0066ff; color: #0033ff; border-top-style: double;
border-top-color: #0066ff; border-right-style: double; border-left-style: double; border-right-color: #0066ff;
border-bottom-style: double; font-style: italic;"> .........so forth

Obviously, other factors must be overriding the position, but I'm new at this and don't have a clue as to what I should be looking for.That is why I was attempting to send everything involved. It's probably some dummy error on my part. All the other renderings follow the 'Style=' settings, so I'm at a loss to figure it out. IE7 works as tested, Firefox shifts to the right only on the one Gridview.

Thanks for any assistance you can provide. Any thoughts?
Aug 6 '07 #9
drhowarddrfine
7,435 Expert 4TB
The problem is you are using html positioning with CSS positioning and they are conflicting with each other. In this case, you say align="center" and then say left:493px. Firefox is accommodating that while IE ignores you.

You also conflict on settings borders. The align="center" does not exist in current html or xhtml. And that is an awful lot of crap being putout that should be combined but I guess that's what .net does.

So remove everything before the style= and go from there.

Also, Tan and LightGoldenrodYellow are not valid, standard colors.
Aug 6 '07 #10
HEX
30
Thanks for your assistance. Per your instructions, I removed the HorizontalAlign="Center" on the control in question and got it working. It is interesting that all the controls had the same parameter, yet only one rendered funny and it was way right and not centered. Both IE and Firefox ignored the other controls 'HorizontalAlign' and only Firefox affected rendering in the one case. It appears this form of conflict can cause unpredictable results and anything can happen. Lots of learning to do and am obtaining an XHTML ref to get a better handle on this stuff.

Thanks again.
Aug 6 '07 #11
drhowarddrfine
7,435 Expert 4TB
Rule number 1: Never, ever use IE as your initial test. It is old, buggy and nine years behind web standards. Always, always use a modern browser that is most standards compliant, such as Firefox, Opera or Safari. Then you can adjust for IEs quirks and bugs.
Aug 6 '07 #12

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by Steve Loper | last post: by
3 posts views Thread by Stan SR | last post: by
7 posts views Thread by =?Utf-8?B?V2FubmFiZQ==?= | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by Gurmeet2796 | last post: by
reply views Thread by mdpf | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by listenups61195 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.