| Author |
Message |
|
webgraphic
|
Post subject: [Solved] First and last css style for menu Posted: Wed May 30, 2012 5:06 pm |
|
Joined: Wed May 30, 2012 4:53 pm Posts: 31
|
|
I need to define a CSS style for the first and last item in the menu? Can you please advise how to customize the php?
Last edited by webgraphic on Mon Jun 04, 2012 6:16 am, edited 1 time in total.
|
|
 |
|
 |
|
maskas
|
Post subject: Re: First and last css style for menu Posted: Wed May 30, 2012 6:46 pm |
|
 |
| Project Developer |
Joined: Tue Apr 28, 2009 9:43 am Posts: 1720
|
|
 |
|
 |
|
webgraphic
|
Post subject: Re: First and last css style for menu Posted: Thu May 31, 2012 11:37 am |
|
Joined: Wed May 30, 2012 4:53 pm Posts: 31
|
|
 |
|
 |
|
maskas
|
Post subject: Re: First and last css style for menu Posted: Thu May 31, 2012 7:11 pm |
|
 |
| Project Developer |
Joined: Tue Apr 28, 2009 9:43 am Posts: 1720
|
|
If you don't know PHP, use CSS.
|
|
 |
|
 |
|
webgraphic
|
Post subject: Re: First and last css style for menu Posted: Thu May 31, 2012 8:07 pm |
|
Joined: Wed May 30, 2012 4:53 pm Posts: 31
|
maskas wrote: If you don't know PHP, use CSS. I need to draw this result that I can style. I don't know how to modify the file common.php <ul class="level1"> <li class="typeDefault first"><a href="">a</a></li> <li class="typeDefault"><a href="">b</a></li> ... <li class="typeDefault last"><a href="">e</a></li> </ul> Sorry for my bad English.
|
|
 |
|
 |
|
Audrius
|
Post subject: Re: First and last css style for menu Posted: Thu May 31, 2012 9:18 pm |
|
 |
| Project Manager |
Joined: Wed Nov 25, 2009 9:40 am Posts: 421
|
|
So if you know CSS (you say you can style), just use :first-child and :last-child subselectors. No need of any PHP coding.
|
|
 |
|
 |
|
webgraphic
|
Post subject: Re: First and last css style for menu Posted: Thu May 31, 2012 10:42 pm |
|
Joined: Wed May 30, 2012 4:53 pm Posts: 31
|
Audrius wrote: So if you know CSS (you say you can style), just use :first-child and :last-child subselectors. No need of any PHP coding. Thank you for your patience, but I don't understand. The menu is created dynamically with management. Subselectors should I enter somewhere in the administration?
|
|
 |
|
 |
|
maskas
|
Post subject: Re: First and last css style for menu Posted: Fri Jun 01, 2012 6:26 pm |
|
 |
| Project Developer |
Joined: Tue Apr 28, 2009 9:43 am Posts: 1720
|
|
You should change ip_themes/lt_pagan/site.css
|
|
 |
|
 |
|
webgraphic
|
Post subject: Re: First and last css style for menu Posted: Sat Jun 02, 2012 9:17 am |
|
Joined: Wed May 30, 2012 4:53 pm Posts: 31
|
maskas wrote: You should change ip_themes/lt_pagan/site.css I still don't understand. CSS styles aren't the problem, but I need the result in HTML (via php/menu/common.php).
|
|
 |
|
 |
|
maskas
|
Post subject: Re: First and last css style for menu Posted: Sat Jun 02, 2012 2:18 pm |
|
 |
| Project Developer |
Joined: Tue Apr 28, 2009 9:43 am Posts: 1720
|
The thing you want to achieve, can be achieved using HTML changes or just CSS. CSS is much easier. But if you want to change HTML, you need to know some PHP, because HTML is generated in PHP. Here is manual how to write your own script that generates menu: If you want to do that using PHP, please read this article: http://www.impresspages.org/docs2/worki ... on-class2/
|
|
 |
|
 |
|