This is a migrated thread and some comments may be shown as answers.

[Solved] PanelBar renders correctly in IE 8, but not Firefox 7.0.1

1 Answer 20 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dominique
Top achievements
Rank 1
Dominique asked on 08 Nov 2011, 05:07 PM
Hi All,
  I'm using the following code from the demo in a new Telerik created Solutions...

@(
 Html.Telerik().PanelBar()
        .Name("PanelBar")
        .HtmlAttributes(new { style = "width: 250px; float: left; margin-bottom: 30px;" })
        .ExpandMode(PanelBarExpandMode.Multiple)
        .SelectedIndex(0)
        .Items(items =>
           {
               items.Add()
                    .Text("V2AMX-BY5604J")
                    .ImageUrl("~/Content/images/icon_servicemaster.png")
                    .ImageHtmlAttributes(new { alt = "Master Server Icon" })
                    .Content("TreeView HERE");              
 
            items.Add()
                .Text("Mail")
                .ImageUrl("~/Content/images/icon_servicevod.png")
                .ImageHtmlAttributes(new { alt = "Mail Icon" })
                .Items(subItem =>
                {
                    subItem.Add()
                            .Text("Personal Folders")
                            .ImageUrl("~/Content/images/icon_config.png")
                            .ImageHtmlAttributes(new { alt = "Personal Folders Icon" });
                    subItem.Add()
                            .Text("Deleted Items")
                            .ImageUrl("~/Content/images/icon_config.png")
                            .ImageHtmlAttributes(new { alt = "Deleted Items Icon" });
                    subItem.Add()
                            .Text("Inbox")
                            .ImageUrl("~/Content/images/icon_config.png")
                            .ImageHtmlAttributes(new { alt = "Inbox Icon" }).Enabled(false);
                    subItem.Add()
                            .Text("My Mail")
                            .ImageUrl("~/Content/images/icon_config.png")
                            .ImageHtmlAttributes(new { alt = "My Mail Icon" });
                    subItem.Add()
                            .Text("Sent Items")
                            .ImageUrl("~/Content/images/icon_config.png")
                            .ImageHtmlAttributes(new { alt = "Sent Items Icon" });
                    subItem.Add()
                            .Text("Outbox")
                            .ImageUrl("~/Content/images/icon_config.png")
                            .ImageHtmlAttributes(new { alt = "Outbox Icon" });
                    subItem.Add()
                            .Text("Search Folders")
                            .ImageUrl("~/Content/images/icon_config.png")
                            .ImageHtmlAttributes(new { alt = "Search Folders Icon" });
                });
 
           })
)

In IE the above renders correctly, but in Firefox All the subitems under the "Mail" item are rendered as if they at staggered like so...

Personal Folders
    Deleted Items
        Inbox
            My Mail
                Sent Items
                    Outbox
                        Search Folders

instead of directly under each other. What am I missing because this code is copy and pasted directly from the Telerik demos, where it renders correctly on all browsers.

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 10 Nov 2011, 04:52 PM
Hello Dominique,

 The demo is designed to use images with size 22x19 or 16x16 pixels. If your images have different size, you need to modify the css that was placed at the end of the View (I noticed that these styles are missing from your code). You can also remove the "float:left" style from the PanelBar. It is used to align the PanelBar and the Configurator in the demo.

If you still experience problems after that, please send us a full sample project so we can check it.

All the best,
Daniel
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
PanelBar
Asked by
Dominique
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or