CodeVerge.Net Beta
Login Idy
Register Password
  Forgot?
Explore    Item Entry    Members   
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML





Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 2/26/2007 3:02:45 AM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 5 Views: 16 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
6 Items, 1 Pages 1 |< << Go >> >|
zfrenzel
Asp.Net User
Remove 'font-size:1em;' from anchor's style attribute for rendered Menu Item2/26/2007 3:02:45 AM

0/0

My menu items are rendering as:

<tr>
	<td style="white-space:nowrap;width:100%;">
<a class="MenuLevel1" href="www.asp.net" style="border-style:none;font-size:1em;">Home</a>
</td>
</tr>
 Although I am setting the font size in my CSS file where I defined MenuLeve1, certain browsers (Safari for one), seem to use the 1em font-size.  I get this style applied to menu items at each level of the menu.
 The definition for my menu is:

<

asp:Menu ID="mnuMain" runat="server" StaticDisplayLevels="2" DynamicVerticalOffset="1" >

<LevelMenuItemStyles>

<asp:MenuItemStyle CssClass="MenuLevel1" Font-Underline="False"/>

<asp:MenuItemStyle CssClass="MenuLevel2" Font-Underline="False"/>

<asp:MenuItemStyle CssClass="MenuLevel3" Font-Underline="False"/>

<asp:MenuItemStyle CssClass="MenuLevel4" Font-Underline="False"/>

<asp:MenuItemStyle CssClass="MenuLevel4" Font-Underline="False"/>

<asp:MenuItemStyle CssClass="MenuLevel4" Font-Underline="False"/>

</LevelMenuItemStyles>

<StaticMenuItemStyle Font-Size="10pt" />

<DynamicMenuItemStyle Font-Size="10pt" />

</asp:Menu>

 

 

Zhao Ji Ma - MS
Asp.Net User
Re: Remove 'font-size:1em;' from anchor's style attribute for rendered Menu Item2/27/2007 10:11:05 AM

0/0

Hi,

The In-line CSS Style rules take precedence over external CSS style sheets rules.

hope it helps!

 


Zhao Ji Ma
Sincerely,
Microsoft Online Community Support

?Please remember to click ?Mark as Answer? on the post that helps you, and to click ?Unmark as Answer? if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. ?
zfrenzel
Asp.Net User
Re: Remove 'font-size:1em;' from anchor's style attribute for rendered Menu Item2/28/2007 2:46:44 AM

0/0

Hi Zhao,

Thanks for your response.

 I am aware that the inline CSS takes precedence, however I  do not want the 'font-size' attribute to appear at all inline because I do not want the font-size to be 1em.  In my style sheet I define it as being 10pt, however as your pointed out the inline css value 1em overrides my style sheet.

 Any ideas?

daji
Asp.Net User
Re: Remove 'font-size:1em;' from anchor's style attribute for rendered Menu Item2/10/2008 7:54:10 PM

0/0

Does anyone know how to remove 'font-size:1em' from the anchor's style attribute?

Sergey Trofimch
Asp.Net User
Re: Remove 'font-size:1em;' from anchor's style attribute for rendered Menu Item2/16/2008 4:22:44 AM

0/0

You can remove 'font-size:1em' from the anchor's style attribute by typing in your css file:

table.MenuLevel1td{font-size:8pt;} 
 
Dave Sussman
Asp.Net User
Re: Remove 'font-size:1em;' from anchor's style attribute for rendered Menu Item2/16/2008 10:25:02 AM

0/0

One problem with the standard rendering of the Menu is that is produces HTML thatis less than friendly for CSS. Your best be is to use the CSS Adapters (http://www.asp.net/cssadapters/), which change the HTML that is output, so the Menu would output UL/LI elements which are more easily styled. The added benefit is that you get cleaner HTML and your page size is reduced.

d

6 Items, 1 Pages 1 |< << Go >> >|



Search This Site:


Meet Our Sponsors:



Other Resources:

Groupwise Fonts - novell.support.groupwise.6x.clients - Web Programming ... 7/7/2004 9:39:32 AM. Reply. 0/0. Dave Browne<[email protected]> wrote in ... remove 'font-size:1em;' from anchor's style attribute for rendered menu item ...
Cascading Style Sheets, level 1 the person for whom the document is rendered. replaced element ... E.g., a style sheet can legally specify that the 'font-size' of an 'active' link ...
Cascading Style Sheets, level 1 Other style properties are likewise inherited, e.g. 'font-family' and 'font-size' ... turn off the influence of a certain style sheet, e.g. through a pull-down menu. ...
The CSS Anthology How do I use an image for a list item bullet? .46 ... How do I style a structural list as a navigation menu? .77 ... font-size: 1em; color: #000000; ...
CSS, JavaScript and XHTML Explained " 2007 We first remove the default bullets with list-style-type: none; ... Then include more detail about the destination in the title attribute of the parent anchor tag. ...
Microsoft Word - WebSimple ... bold, and other typographical tags from the "Text Style" menu item under. the "Format" menu. ... Netscape automatically creates an anchor for you at. that ...
HTML Mastery: Semantics, Standards, and Styling attribute can only be applied to anchor tags for link-targeting purposes, whereas you can ... remove the style sheet from your document and have the document ...
Releasing CSS attribute to a link and a list item to style those elements as. shown in Figure 4: <html> ... { font-size: 1.1em; margin: 0; padding: 0; Releasing. CSS. 63 ...
www.realmacsoftware.com/downloads/sdks/rapidweaver4_themesdk.pdf For example, a sight impaired visitor will be able to increase the size of the font ... list-style-type, is used to define the style of graphic by each list item <li> ...
Web Accessibility times the href attribute of the anchor tag (<a>), and sometimes the src or the name ... HTML document is rendered without associated style sheets, it must ...


 
All Times Are GMT