CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

ASP.NET Web Hosting – 3 Months Free!
Free 3 Months



Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 9/13/2006 12:00:24 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 3 Views: 41 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
4 Items, 1 Pages 1 |< << Go >> >|
Rasetti
Asp.Net User
MenuAdapter different browser rendering9/13/2006 12:00:24 AM

0/0

Hi!!

This issue I 'm experiencing is probably not a MenuAdapter problem, maybe more a browser problem. But, since it's been happening with my menu control I decided to look here for some ideas:

The scenario is:
I test my application in 3 different platforms: IE 6, Firefox 1.5 and IE 7 RC1.
I have a navigation menu at the top, which is using the CSS MenuAdapter. It is an Horizontal menu with 5 top level items.  
You can look at it at www.vedere-group.com

If you use Firefox, you will see my "intended" menu. This is: each top level item doesn't have a predefined width, so they align themselves according with the text inside. Here is the CSS chunk:

.MainMenu .AspNet-Menu-Horizontal ul.AspNet-Menu li { padding: 3px 40px 4px 10px; color: inherit; background-color: #BEBEBE;}

If you use IE6 you will see a different alignment (kinda ugly), because I had to set the width of each item, otherwise I'll get a "vertical" menu (this means: the li items are not positioning right to each other, but below). For this, I use a conditional CSS:

.MainMenu .AspNet-Menu-Horizontal ul.AspNet-Menu li {width: 111px ;padding: 3px 10px 4px 10px;; color: inherit; background-color: #BEBEBE;}

And, if you use IE7 RC1, you'll get the proper "firefox" alignment, but the submenus get completely misaligned at the right of the top level item.

Here is the sub menu box CSS: 

.MainMenu .AspNet-Menu-Horizontal ul.AspNet-Menu li ul {width: 160px;margin: 4px 0 0 -5px;border: solid 1px #BEBEBE;}

If i change the margins to make the sublevel item aligned in IE7 RC1 (like:  .MainMenu .AspNet-Menu-Horizontal ul.AspNet-Menu li ul {width: 160px;margin: 18px 0 0 -50px;border: solid 1px #BEBEBE;} ), I screw up in IE6 and Firefox.!!

I can give more details or even try to upload sample pages, but I'm not sure what's the issue here, and if its a browser problem only. If anybody has some idea it would be much appreciated!

 Thanks,

Juan 


Juan Barrera
MCTS


Please remember to click "Mark as Answer" on this post if it helped you.
Rasetti
Asp.Net User
Re: MenuAdapter different browser rendering9/13/2006 2:41:04 AM

0/0

Ok, here is a follow-up:

I've been testing - fixing several hours and I think I fixed almost all the issues.
I've found that, in many cases, it was related with the way the different browsers render the box model, and I must say, I didn't recognize it before because I'm more a programmer than a designer, so I'm not very confident with all the browsers CSS hacks stuff.

But, there are only two issues I couldn't solve yet:

1) With IE 7 RC1: If you go to www.vedere-group.com , then mouse over the "Products" tab, and then mouse over one of the two sub items, you will notice a 2 or 3 pixels transparent space appearing below the particular item. This is only in IE7 and I couldn't fix it. At least, any idea on which property could affect it?

2) Still, with IE6, if I don't explicitely set the width attribute for the top - level items ( .MainMenu .AspNet-Menu-Horizontal ul.AspNet-Menu li), I get a vertical menu, i.e: all the top level items are stacked below to each other instead of sequentially be on the right.

So. I think I narrowed the problem a lot, but I still couldn't figure out those two :)...

Any thoughts?

Thanks,

Juan


Juan Barrera
MCTS


Please remember to click "Mark as Answer" on this post if it helped you.
Russ Helfand
Asp.Net User
Re: MenuAdapter different browser rendering9/13/2006 6:20:52 PM

0/0

I hope you don't mind, but I'd like to address the second problem first.  I'm not sure I understand the problem.  You are saying that if you set a width for the top level <li> elements then the menu items are laid out horizontally and everything is OK.  Is there a problem with setting the width like this?  Does it break something else?

Maybe you asking if there is a way to get the <li> tags to line up horizontally without specifying a width for them so their widths correspond to their text (and automatically adjust to be wider or narrower as the text is added to or subtracted from).  That's a reasonable thing to want to do.  The crux is making the <li> use display:inline but there are a few other things that you need to do, too.  Take a look at this earlier posting if you haven't already, http://forums.asp.net/thread/1327524.aspx.

Like I said, let's work out the solution your second issue first.  Then we can start tackling the IE7 problem... which, frankly, I've not yet had a chance to think about... sorry!


Russ Helfand
Groovybits.com
Rasetti
Asp.Net User
Re: MenuAdapter different browser rendering9/13/2006 8:50:19 PM

0/0

Hi Russ, thanks for your time!

Well, of course I don't have any problems addressing one problem at the time!

And, yes, you've understood correctly: What I want to do is to get the li tags to line up horizontally without specifying a width for them so their widths correspond to their text.
If I do set a width I loose the "alignment" effect I'm trying to achieve, so yes, I have a problem with that.

I'm going to take a look at the post you say, I'll hope to find the solution there!

And, as soon as you have the chance to have a look at the IE7 problem, just let me know!

Thanks,

Juan  

 

 


Juan Barrera
MCTS


Please remember to click "Mark as Answer" on this post if it helped you.
4 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Pro ASP.NET 2.0 in VB 2005: From Professional to Expert Authors: Laurence Moroney, Matthew MacDonald, Pages: 1253, Published: 2006
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005

Web:
MenuAdapter different browser rendering - ASP.NET Forums Re: MenuAdapter different browser rendering. 09-12-2006, 10:41 PM ... Re: MenuAdapter different browser rendering. 09-13-2006, 2:20 PM ...
MenuAdapter - Menu Items not visible if beyond bottom of page ... If you reduce your browser size and then scroll the page so the ... Menu's now render upwards if they overlap the bottom of the screen, ...
MenuAdapter Class (System.Web.UI.WebControls.Adapters) You can extend the MenuAdapter class to further customize rendering or behavior of ... browser or class of browsers, or acts as a filter on some capability. ...
MenuAdapter Class (System.Web.UI.WebControls.Adapters) You can extend the MenuAdapter class to further customize rendering or behavior of ... The HttpBrowserCapabilities class uses browser definition files to ...
CMOSS Aug 18, 2006 ... In this section you normally specify a lot of different browsers and their capabilities. But what if all the browsers should render the same ...
Dr. Dobb's | ASP.NET Control Adapters | August 2, 2007 Aug 2, 2007 ... NET controls have their entry point in the rendering engine in the Render ... public class MenuAdapter : System.Web.UI.WebControls.Adapters. ...
Useful ASP.NET Hints and Tips: May 2007 The CSS Friendly Control Adapters were created to avoid the rendering of certain ASP. ... Next, I keep only the MenuAdapter.vb and the ...
MSDN Commerce Server 2007 MenuAdapter.cs MenuAdapter.cs. I don't believe it's possible. The adapters are chosen based on browser. And since the adapter plumbing is buried deep within System. ...
CSS Friendly Control Adapters - View Issue Removing the adapter tag from ControlAdapters.browser file and rendering the ... Modify MenuAdapter.js so SetHover__AspNetMenu is called on all browsers. ...
Steps for adding a CSS Control Adapter - Onion Blog - Pluralsight ... Step 7b: For the menu control, you need to copy the MenuAdapter.cs (or .vb) file as well. Step 8a: Copy the CSSFriendlyAdapters.browser file from the ...




Search This Site:










dnn 2.0 skinning = fantastic

2.x to 3.x module conversion...

how to generate and install microsoft.web.ui.webcontrols.dll

suggestion to the core team: about projects

substantial changes in 3.08?

skin path ?

regarding bug # 000387 on gdn

re-zipping language files with winzip fails to upload.

vwd 2005 express and dnn4.0 source

css and main nav

audio cutting off in flash movies

iframe module

odd security model - feedback please?

this code sets skin info for portal templates

permission problem while running single instance of dnn on 2 servers

unable to add controls to module definitions

mysql ???

my site, feedback/suggestions sought..

asp .net 2.0 module compatiblity

how to install sql server and dnn 3.0.8

3.08 slow to load site settings and other admin functions

show pages not on tab (dnn 3.0.11)

smtp cdo messages intermittent

comparison between adverageous and active forums

refresh interval for dnn pages

avcalendar 2.0 on dnn 2rc

why dnn does not use dsfck as default htmleditorprovider ? it seems much butter then the actual ftb3 (compatible mozilla, ie7 beta !)

verisign new seal program

how do you add a missing myblog module?

adding fields

  Privacy | Contact Us
All Times Are GMT