CodeVerge.Net Beta


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




Can Reply:  No Members Can Edit: No Online: Yes
Zone: > NEWSGROUP > Asp.Net Forum > microsoft_downloads.css_friendly_control_adapters Tags:
Item Type: NewsGroup Date Entered: 10/13/2007 2:36:18 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
NR
XPoints: N/A Replies: 2 Views: 59 Favorited: 0 Favorite
3 Items, 1 Pages 1 |< << Go >> >|
lspence
Asp.Net User
Centering issue with CSS Friendly Adapter and Horizontal Menu10/13/2007 2:36:18 AM

0

I'm have a tough time trying to get my Menu to be centered using the CSS Friendly Adapters and a menu set to Horizontal Orientation. Below is the CSS I'm using for my navigation menu.

#nav
{
background: #008080;
width:100%;
height:45px;
}
Here is my <div> that encapsulates the Menu Control. 
<div id="nav"">
<asp:Menu ID="NavigationMenu" runat="server" Orientation="Horizontal" CssSelectorClass="CssAdapterMenu" DataSourceID="NavSiteMapDataSource" style="margin: auto; text-align: center">
</asp:Menu>
</div>
I've tried numerious combinations of margins and padding, but the menu always aligns around 100 or so pixels from the left no matter what I try it never moves.
Does anyone have any suggestions on how I can get it to align centered? 

My Blog
http://Lspence.blogspot.com

(Please MARK this post as ANSWERED, if you find it helpful)
bpw
Asp.Net User
Re: Centering issue with CSS Friendly Adapter and Horizontal Menu10/13/2007 8:36:11 AM

0

You can?t center it directly like this; you have to do it manually in your stylesheet. There might be a simpler way, but In my stylesheet I have:

.CssAdapterMenu .AspNet-Menu-Horizontal
{
  margin-left: auto;
  margin-right: auto;
  width: 722px;
}

..CssAdapterMenu .AspNet-Menu-Horizontal ul.AspNet-Menu
{
  width: 722px;
}

/* The above width values are used to center the menu. The values should be just wide enough to accommodate the menu items. This is a menu with 6 items, so the above widths will be approximately 6x the width below. */

..CssAdapterMenu .AspNet-Menu-Horizontal ul.AspNet-Menu li
{
  text-align: left;
  white-space: nowrap;
  width: 120px;
  background-color: #bbbbbb !important;
}

Paul Weston
lspence
Asp.Net User
Re: Centering issue with CSS Friendly Adapter and Horizontal Menu10/14/2007 2:02:04 AM

0

Thanks.


My Blog
http://Lspence.blogspot.com

(Please MARK this post as ANSWERED, if you find it helpful)
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Professional ASP.NET 2.0 Design: CSS, Themes, and Master Pages Authors: Jacob J. Sanford, Pages: 474, Published: 2007

Web:
CSS friendly menu adapter shortfall - ASP.NET Forums The CSS menu adapter is cool and it does some pretty cool stuff. ...
Putting the CSS Friendly Control Adapters to work | Programming ... Nov 13, 2007 ... Using the CSS Friendly Control Adapters delivers a menu using an HTML unordered ...
Menu Control Adapter: ASP.NET 2.0 CSS Friendly Control Adapters 1.0 A control adapter can "teach" the Menu how to produce this kind of CSS friendly HTML without sacrificing the power and flexibility of the original Menu ...
ASP.net CSS friendly Control Adapters CSS Friendly Control Adapters home site. It took a day to get this menu and ... ...
CSS Friendly Control Adapters - Discussions The .css File: .MainMenu ul.AspNet-Menu /* Tier 1 */ ... background: transparent url(arrowRight.gif) right center no-repeat; } .MainMenu li. ...

Variable width of horizontal top level menu elements ... flyout menus can disappear off the edge of the page · centering issue with css friendly adapter and horizontal menu · css control adapters ...
CSS Friendly Control Adapters is not running with Update Panel of ... menu overlay issue with absolute and relative positioned elements only in ie. centering issue with css friendly adapter and horizontal menu ...
css toolkit adapters- apply css style to gridview row in code (c# ... In your gridview css file add the colors you need EG: .... horizontal menu - some clients seeing space between menu items ... problem centering menu control using adpaters · css friendly treeview · Privacy | Contact Us ...
Gridview OnRowDataBound change e.Row.CssClass ... I have a gridview and I'm trying to change a row's css class on the fly in onRowDataBoudn method. .... gridview adapter doesn't distinguish between itemstyle and headerstyle ... css friendly menu has disappeared (emergency) · login control & validation ... centering static level of horizontal menu. ...
Setting CSS class for tbody of GridView - ng.asp-net-forum ... But I found no way to specify the custom CSS class for tbody. ... tabs in css adapters menu · treeview checkbox postback issue ... problem centering menu control using adpaters ... css friendly adapters + createuserwizard + custom membership ... menu adapter, sitemap file horizontal display. ...






changepassword validation group

warning cssselectorclass

install - update - css control adapters

several subcategories in a treeview with a depth of 6

output opinion

can you set the css adapters to that each <li> node displays a unique id?

menuadapter beta 2

webparts

two menus on the page- with css adapters and without

createuserwizard with cssadapters

node selection problem in cssadapter tree view

css friendly adapters & firefox not displaying correctly

need little help understanding working of adaptors

gridview cellpadding & cellspacing attributes

menuadapter - menu items not visible if beyond bottom of page

treeview submit causes multiple calls to ontreenodecheckchanged method

trying to use adapter to modify validationsummary to use span instead of div

little help to start with cssadapter for menu

exception has been thrown by the target of an invocation.

securitytrimmingenabled

sorting separators in gridview

adapters on templates are not properly bound

menu underlines visited items in ie6 only

experimental datalistadapter w/ repeatcolumns fix

serving suggestion

executing javascript from menu adapter

menu onmouseout strange behaviour

treeview with three state chechbox

modify menu adapter to show selected <ul> element

login displaying horizontally

   
  Privacy | Contact Us
All Times Are GMT