-
Drupal Menu items
Hi I'm new to Drupal and I am looking to add a value to class in the Primary Links menu so that it outputs something like this: <ul> <li><a href="#" class="0">First Link</a></li> <li><a href="#" class="1">Second Link</a></li> <li><a href="#" class="2">Third Link</a></li> <li><a href="#" class="3">Fourth Link</a></li> <li><a href="#" class="4">Fifth Link</a></li> </ul> I have tried modifying theme_menu_item as per below but this just adds class="0" to every a tag instead of incrementing. function theme_menu_item($link, $has_children, $menu = '', $in_active_trail = FALSE, $extra_class = NULL) { $class = ($menu ? 'expanded' : ($has_children ? 'collapsed' : 'leaf')); if (!empty($extra_class)) { $class .= ' '. $extra_class; } if ($in_active_trail) { $class .= ' active-trail'; } $i = 0; while($i < count($link)){ return '<li class="'. $i .'">'. $link . $menu ."</li>\n"; $i++; } } If anyone can help me with this I would very much appreciate it. Thank you in advance.
-
Hello :D
Welcome to the Forum
-
Hey!
Welcome to the Forum, just had a sneaky peak at your portfolio, you're off to a flying start at 18!
-
Razz Here :)
Welcome to the Forum
-
Browse Tutorials
Try adding a margin to the bottom of the category to separate the title and category from the copy below, by adding a bit of space in, it might help it to be a bit more readable. Perhaps you could add a subtle background colour to the tutorial title that goes all the way across to the end of the section? You could always play with the layout in something like Photoshop which would make it quick to try different designs out.
-
Sliced photoshop images
This is because the HTML page cannot find the images. You have done the right thing by uploading them to the server, you will just need to make sure that they are in the right folder, because it is likely that the html is looking for the images in a folder which either doesn't exist, or does exist but does not contain any folders. For example, if the code you have used to display the image is as follows: <img src="images/image.jpg" alt...... You will need to make sure that the image called image.jpg is stored in a folder called "images". Hope this makes sense
-
z-index and background images
This works but I've got a feeling that a negative value for z-index doesn't validate, you should try adding 'position:relative;' to the #topmenu div. Z-index needs to be accompanied by 'position' for it to take effect.
-
TUTORIAL: 9 IE Bugs and How to Fix them
A few good points about IE6 on that website, hopefully IE6 will be made illegal in the future.
-
Howdy Doody
Welcome to the Forum
-
Hello all
Welcome to the Forum
-
Opinions and feedback please!
Chris, The design is wicked, I like the colour scheme and you have arranged the content in an easy to read way, especially in the second example now that you have played with the typography. You could try having headings in a different colour to the paragraph text to further emphasize headings. This shouuld only be subtle, maybe make the paragraph text a slightly lighter colour than the headings?
-
Use of H-tags within paragraphs?
As well as using <strong> tags, you could use <span> tags and then use classes and CSS to make words different sizes, e.g. p { font-size:14px; } .largetext { font-size:16px; } <p>This is the sentence you want the <span class="largetext">large words</span> to be in</p> If sentences start to overlap, adjust the line-height using CSS. Hope this makes sense
-
Whats the best free stats counter?
I recommend Google Analytics as well, it's free and provides a wide spectrum of feedback on traffic to your website.
-
Email template fix
In the table cell containing the H1 tag, where the text says 'Company Name' in blue letters, add colspan="2" to the td tag to spread the cell over 2 columns, rather than one. This will move the smaller, underlined text to the outer edge of the page. For the large blue box just below the 'Company Name' text, I recommend changing the valign value to 'top' rather than bottom, and change the padding value from '0 0 2px' to '20px'. This seems to help the text to sit a lot better in the box.
-
Need help plz....HTML Beginner
A friend recommended good-tutorials.com to me a few months ago, it's pretty good for HTML and PHP, but also covers more such as Illustrator, Photoshop and loads of others. I have used it quite a lot recently to learn both PHP and illustrator, in my efforts to understand a variety of disciplines and recommend it to anyone!