Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

benwebdesigner

Members
  • Joined

  • Last visited

  1. 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.
  2. Welcome to the Forum
  3. Welcome to the Forum, just had a sneaky peak at your portfolio, you're off to a flying start at 18!
  4. Welcome to the Forum
  5. 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.
  6. 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
  7. 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.
  8. A few good points about IE6 on that website, hopefully IE6 will be made illegal in the future.
  9. Welcome to the Forum
  10. Welcome to the Forum
  11. 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?
  12. 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
  13. I recommend Google Analytics as well, it's free and provides a wide spectrum of feedback on traffic to your website.
  14. 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.
  15. 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!

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.