The Joomla! Forum ™



Forum rules


Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.



Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Mar 29, 2010 9:03 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Wed Feb 04, 2009 5:19 pm
Posts: 2
Am I the only one that finds the whole process of continuesly adding styling to the CSS for each menu item added? It is plain idiotic thinking that <li class="itemXX"> is good styling practice!

As someone said earlier - class is ment to be used for repetative usage, not unique id:s. What if there was a Menu Item Class Suffix field in the Edit Menu Item part of Joomla, so that you really could add <li class="customclassname1"> to a l l menu items you want to style in a certain way, and <li class="customclassname2"> to menu items you wanted to have another look? That way your CSS file could end up looking like this:

.customclassname1 { color: red; }
.customclassname2 { color: green; }

Instead of

.item1, .item2, .item3, .item4 { color: red; }
.item5, .item6, .item7, .item8 (and so forth...) { color: green; }

How come no one at the Joomla developer team even thaught of this? Or did you, but just didn't saw the benefits in using classes as classes should be used? I truly want to know.


Top
 Profile  
 
PostPosted: Sun Nov 28, 2010 12:16 pm 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Sat Jun 19, 2010 9:02 am
Posts: 103
Location: Chiang Mai
Hi,
This topic is what I've been trying to solve for the last 2 days, Please someone help, tell me what I'm doing wrong! I've been trying to replicate the instructions in this thread and have tried various (endless) permutations and variations of that but still to no avail. Here's my CSS/HTML I onluy include 2 items for brevity's sake.

<div id="ftmm">
<div class="moduletable nos">
<ul class="menu bamboo sf-menu bamboo sf-vertical" id="ftmm">
<li id="current" class="parent active item107">
<a href="http://127.0.0.1/Joomla/">
<span>Home</span>
</a>
</li>...
...</li>
<li class="parent item105"><a href="http://127.0.0.1/Joomla/index.php?option=com_content&amp;view=article&amp;id=15&amp;Itemid=105">
<span>Our products</span></a>
<ul>...


.menu.bamboo.sf-menu li .parent.item107 a:link
{ background-image: url('../../../images/stories/menus/ftmm01p1.jpg') 0 -223px no-repeat;
}
.menu.bamboo.sf-menu li .parent.item107 a:visited
{ background-image: url('../../../images/stories/menus/ftmm01p1.jpg') 223 -446px no-repeat;
}
.menu.bamboo.sf-menu li .parent.item107 a:hover
{ background-image: url('../../../images/stories/menus/ftmm01p1.jpg') 446 -669px no-repeat;
}
.menu.bamboo.sf-menu li .parent.item107 a:active
{ background-image: url('../../../images/stories/menus/ftmm01p1.jpg') 669 -892px no-repeat;
}
.menu.bamboo.sf-menu li .parent.item115 a:link
{ background-image: url('../../../images/stories/menus/ftmm01p2.jpg') 0 -223px no-repeat;
}
.menu.bamboo.sf-menu li.parent.item115 a:visited
{ background-image: url('../../../images/stories/menus/ftmm01p2.jpg') 223 -446px no-repeat;
}
.menu.bamboo.sf-menu li .parent.item115 a:hover
{ background-image: url('../../../images/stories/menus/ftmm01p2.jpg') 446 -669px no-repeat;
}
.menu.bamboo.sf-menu li .parent.item115 a:active
{ background-image: url('../../../images/stories/menus/ftmm01p2.jpg') 669 -892px no-repeat;
}


Top
 Profile  
 
PostPosted: Thu Apr 14, 2011 8:41 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Apr 14, 2011 8:17 am
Posts: 5
Location: Bandung
joomla masters. I am a beginner developer joomla template. I want to ask, how to fill the background module on joomla templates and image splicing process.

please help me. thank you

_________________
http://www.medisch.us
http://www.easymarket.[spam].com


Top
 Profile  
 
PostPosted: Thu Jul 14, 2011 1:28 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Aug 16, 2009 2:39 pm
Posts: 15
Location: Crows Nest Qld Australia
herb200mph wrote:
The html is:

<li class="item#">

The CSS is:

ul.menu li.item# a {
font-family: ;
font-size: ;
font-weight: ;
color: ;
text-decoration:;
display:block;
}

Can also create: a:active, a:visited, etc.


For Joomla 1.7.x menu items this now becomes:

ul.menu li#item-1245 a {
color:red;
}

Items are now represented by a hash symbol which of course represents an id instead of a class. Don't confuse this with the previous example where a # hash symbol was used to represent a number.

Depending which menu item you are targeting usually it cascades to subsequent menu items.

_________________
Kind Regards,
Noel Dixon
http://www.noxidsoft.com
Signature must be kept to a maximum of four lines. See Forum Rules: viewtopic.php?f=8&t=65


Top
 Profile  
 
PostPosted: Thu Jul 14, 2011 2:02 am 
User avatar
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Aug 16, 2009 2:39 pm
Posts: 15
Location: Crows Nest Qld Australia
wisnu0405 wrote:
joomla masters. I am a beginner developer joomla template. I want to ask, how to fill the background module on joomla templates and image splicing process.

please help me. thank you


Filling the background of a module depends on the template and thus the css file in current use. I can only suggest using Firebug or similar to identify the style sheet(s) and the class(s) you would want to target, otherwise this is a very generalized question?

I can also suggest looking at a free release of a RocketTheme template on how this might be done.

_________________
Kind Regards,
Noel Dixon
http://www.noxidsoft.com
Signature must be kept to a maximum of four lines. See Forum Rules: viewtopic.php?f=8&t=65


Top
 Profile  
 
PostPosted: Fri May 04, 2012 6:04 pm 
Joomla! Apprentice
Joomla! Apprentice

Joined: Tue Aug 18, 2009 5:55 pm
Posts: 17
Location: Long Beach, CA
hello, i have been reading these replies trying to find the sntax to just change the color of 1 menu link I have a Donations link i want to have color Red thats it.. leaving all other link colors the same i have joomla 2.5 loaded and have been trying to understand the css syntax for the menu module thanks for any help


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 36 posts ]  Go to page Previous  1, 2



Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group