using css on menu items

  • Thread starter Thread starter ton
  • Start date Start date
T

ton

Hi,

How can I use CSS files for menuitems. I'm trying something like:

..menu11 { font-family: Arial; font-size: 11pt ; color: White;} but it does
not work

thanx

ton
 
re:
!> How can I use CSS files for menuitems. I'm trying something like:
!> .menu11 { font-family: Arial; font-size: 11pt ; color: White;} but it does not work

Download, install and check out the CSS Menu Generator.

http://www.wonderwebware.com/

It's free...and you'll be able to study the CSS it generates.

Disclaimer : I am not associated with the CSS Menu Generator.
I only used it...and liked it.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
 
re:
!> How can I use CSS files for menuitems. I'm trying something like:
!> .menu11 { font-family:  Arial;  font-size: 11pt ; color: White;} but it does not work

Download, install and check out the CSS Menu Generator.

http://www.wonderwebware.com/

It's free...and you'll be able to study the CSS it generates.

Disclaimer : I am not associated with the CSS Menu Generator.
I only used it...and liked it.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
=========================

I think he is about ASP.NET Menu Control.
 
re:
!> I think he is about ASP.NET Menu Control.

It doesn't matter. CSS is CSS, no matter where it's applied.

You can design your CSS classes with the CSS menu generator,
either inline in a <style> or in a separate CSS file, and refer to the
generated classes in your ASP.NET markup.

For a detailed list of the ASP.NET menu control elements
to which CSS classes can be applied, Ton can see :

http://msdn.microsoft.com/en-us/library/ms366731.aspx

....as you correctly pointed out.

Try out the CSS menu generator. I think you'll like it.
It made my life a lot easier when designing a menu for an aspx page.

P.S. : later I decided to write my menu using pure CSS.
Standards-based coding has a certain charm to it.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
re:
!> How can I use CSS files for menuitems. I'm trying something like:
!> .menu11 { font-family: Arial; font-size: 11pt ; color: White;} but it does not work

Download, install and check out the CSS Menu Generator.

http://www.wonderwebware.com/

It's free...and you'll be able to study the CSS it generates.

Disclaimer : I am not associated with the CSS Menu Generator.
I only used it...and liked it.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/
=========================

I think he is about ASP.NET Menu Control.
 
re:
!> I think he is about ASP.NET Menu Control.

It doesn't matter. CSS is CSS, no matter where it's applied.

You can design your CSS classes with the CSS menu generator,
either inline in a <style> or in a separate CSS file, and refer to the
generated classes in your ASP.NET markup.

For a detailed list of the ASP.NET menu control elements
to which CSS classes can be applied, Ton can see :

http://msdn.microsoft.com/en-us/library/ms366731.aspx

...as you correctly pointed out.

Try out the CSS menu generator. I think you'll like it.
It made my life a lot easier when designing a menu for an aspx page.

CSS Menu Generator does not work with ASP.NET Menu Control. If you are
using a control, you need to know what css class you have to use, etc,
and that's not a pure CSS question. I agree, it can make your life
easier then items are static. Once you would need a data driven menu
you would consider to use that control I believe.
 
re:
!> CSS Menu Generator does not work with ASP.NET Menu Control

We know it doesn't, Alexei.
It's just a tool so the OP, and anybody else, can study the CSS created by it.

IIRC, his main problem was CSS syntax.
By running the CSS generator, he'll create valid CSS which he can then apply to his menu control.

re:
!> you need to know what css class you have to use

That's one of the menu generator's greatest advantages.
It allows you to visually design your color scheme...and creates the CSS needed to repro the scheme.

You can name the generated class anything you'd like, of course, and the syntax will be perfect.
Works for me.

re:
!> Once you would need a data driven menu you would consider to use that control I believe.

Maybe yes, maybe no. I've done both.
For me, it depends on how often the links change.

Here's a pure CSS menu I created (the green bar just below the golf course's Flash photo montage:

http://www.playadoradagolf.com/

The links are almost permanently static, so it works fine.

Also, I'm changing the site from HTML/PHP to ASP.NET
and wasn't quite ready to implement a major change.

What I'd like to do is go one better...and write a user control which incorporates a menu.

When all the pages are changed to ASP.NET, I'd like to be
able to simply drop the menu user control into any page.

Any hints/links on how to do that ?

Otoh, here's a data-driven ASP.NET menu control which uses an XML file as its data source :

http://asp.net.do/faq/

This one is very easy to maintain. Editing the XML with any XML editor is a snap.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
re:
!> I think he is about ASP.NET Menu Control.

It doesn't matter. CSS is CSS, no matter where it's applied.

You can design your CSS classes with the CSS menu generator,
either inline in a <style> or in a separate CSS file, and refer to the
generated classes in your ASP.NET markup.

For a detailed list of the ASP.NET menu control elements
to which CSS classes can be applied, Ton can see :

http://msdn.microsoft.com/en-us/library/ms366731.aspx

...as you correctly pointed out.

Try out the CSS menu generator. I think you'll like it.
It made my life a lot easier when designing a menu for an aspx page.

CSS Menu Generator does not work with ASP.NET Menu Control. If you are
using a control, you need to know what css class you have to use, etc,
and that's not a pure CSS question. I agree, it can make your life
easier then items are static. Once you would need a data driven menu
you would consider to use that control I believe.
 
re:
!> CSS Menu Generator does not work with ASP.NET Menu Control

We know it doesn't, Alexei.
It's just a tool so the OP, and anybody else, can study the CSS created by it.

IIRC, his main problem was CSS syntax.
By running the CSS generator, he'll create valid CSS which he can then apply to his menu control.

re:
!> you need to know what css class you have to use

That's one of the menu generator's greatest advantages.
It allows you to visually design your color scheme...and creates the CSS needed to repro the scheme.

You can name the generated class anything you'd like, of course, and the syntax will be perfect.
Works for me.

re:
!> Once you would need a data driven menu you would consider to use that control I believe.

Maybe yes, maybe no. I've done both.
For me, it depends on how often the links change.

Here's a pure CSS menu I created (the green bar just below the golf course's Flash photo montage:

http://www.playadoradagolf.com/

The links are almost permanently static, so it works fine.

Also, I'm changing the site from HTML/PHP to ASP.NET
and wasn't quite ready to implement a major change.

What I'd like to do is go one better...and write a user control which incorporates a menu.

When all the pages are changed to ASP.NET, I'd like to be
able to simply drop the menu user control into any page.

Any hints/links on how to do that ?

Otoh, here's a data-driven ASP.NET menu control which uses an XML file asits data source :

http://asp.net.do/faq/

This one is very easy to maintain. Editing the XML with any XML editor isa snap.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/







CSS Menu Generator does not work with ASP.NET Menu Control. If you are
using a control, you need to know what css class you have to use, etc,
and that's not a pure CSS question. I agree, it can make your life
easier then items are static. Once you would need a data driven menu
you would consider to use that control I believe.

I don’t want to argufy :-)
I prefer to use VS.NET to edit CSS directly in the project
 
re:
!> I don’t want to argufy :-)

:-)

re:
!> I prefer to use VS.NET to edit CSS directly in the project

Oh, yeah...it's real easy...once you know how to do it.

<chuckle>

Any ideas on how to create the menu user control painlessly ?




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
re:
!> CSS Menu Generator does not work with ASP.NET Menu Control

We know it doesn't, Alexei.
It's just a tool so the OP, and anybody else, can study the CSS created by it.

IIRC, his main problem was CSS syntax.
By running the CSS generator, he'll create valid CSS which he can then apply to his menu control.

re:
!> you need to know what css class you have to use

That's one of the menu generator's greatest advantages.
It allows you to visually design your color scheme...and creates the CSS needed to repro the scheme.

You can name the generated class anything you'd like, of course, and the syntax will be perfect.
Works for me.

re:
!> Once you would need a data driven menu you would consider to use that control I believe.

Maybe yes, maybe no. I've done both.
For me, it depends on how often the links change.

Here's a pure CSS menu I created (the green bar just below the golf course's Flash photo montage:

http://www.playadoradagolf.com/

The links are almost permanently static, so it works fine.

Also, I'm changing the site from HTML/PHP to ASP.NET
and wasn't quite ready to implement a major change.

What I'd like to do is go one better...and write a user control which incorporates a menu.

When all the pages are changed to ASP.NET, I'd like to be
able to simply drop the menu user control into any page.

Any hints/links on how to do that ?

Otoh, here's a data-driven ASP.NET menu control which uses an XML file as its data source :

http://asp.net.do/faq/

This one is very easy to maintain. Editing the XML with any XML editor is a snap.

Juan T. Llibre, asp.net MVP
asp.net faq :http://asp.net.do/faq/







CSS Menu Generator does not work with ASP.NET Menu Control. If you are
using a control, you need to know what css class you have to use, etc,
and that's not a pure CSS question. I agree, it can make your life
easier then items are static. Once you would need a data driven menu
you would consider to use that control I believe.

I don’t want to argufy :-)
I prefer to use VS.NET to edit CSS directly in the project
 
re:
!> I think, "Add New Item" - "Web User Control"

Smart ass !




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
=========================
re:
!> I don’t want to argufy :-)

:-)

re:
!> I prefer to use VS.NET to edit CSS directly in the project

Oh, yeah...it's real easy...once you know how to do it.

<chuckle>

Any ideas on how to create the menu user control painlessly ?

I think, "Add New Item" - "Web User Control"

http://msdn.microsoft.com/en-us/library/y6wb1a0e.aspx
http://www.google.com/search?q=menu+user+control
 
Back
Top