Better layout solution and/or additional HTML hooks for section listings

Matthew Anderson's Avatar

Matthew Anderson

27 Feb, 2009 01:56 AM

If you have a ton of articles in one section and only a few in another, the layout starts to get messy. A .first or .last class on the LIs would allow me to clear them with some custom CSS. I'm open to any other solution that you guys think is appropriate though.

  1. 1 Posted by Kyle Neath (Git... on 27 Feb, 2009 10:21 AM

    Kyle Neath (GitHub Staff) 's Avatar

    No harm in adding some extra classes. I've added a first-faq and last-faq to the <li> on each FAQ. Should show up next deploy (keep and eye on the changelog to see when it's deployed)

  2. Kyle Neath (GitHub Staff) closed this discussion on 27 Feb, 2009 10:21 AM.

  3. Matthew Anderson re-opened this discussion on 28 Feb, 2009 01:22 AM

  4. 2 Posted by Matthew Anderso... on 28 Feb, 2009 01:22 AM

    Matthew Anderson's Avatar

    Sorry, I should have been more specific. I want to clear every other category block, so I need that class on the parent of the one you placed it on. In the attached screenshot, I'd like Hub Customization to clear under Definitions

    ul.categories li.first-category { clear: left; }

    vs

    ul.categories ul.articles li.first-faq { clear: left; }

  5. 3 Posted by Kyle Neath (Git... on 28 Feb, 2009 01:43 AM

    Kyle Neath (GitHub Staff) 's Avatar

    Hmm, well that's what's currently happening actually (notice "Using Widgets" alignment).

    There's a <div class="rule"></div> every two sections, so if you wanted to make that just a clearer on that page, you could add:

    .page-faqs_sections div.rule{ border:none; clear:both; }
    

    I don't think I'd like to add a class to the ul.categories since it wouldn't really be "first" or "last" since it repeats every 2 items.

  6. 4 Posted by Matthew Anderso... on 04 Mar, 2009 04:58 AM

    Matthew Anderson's Avatar

    Kyle,

    I don't want to be a pain, but I've only got one <div class="rule"></div> on that page and it won't help me with clearing the <li>s.

    I'm looking to clear every other <li> within <ul class="categories">

    Thanks for your continued help.

  7. 5 Posted by Kyle Neath (Git... on 04 Mar, 2009 05:23 AM

    Kyle Neath (GitHub Staff) 's Avatar

    ah I see what you mean now, sorry for the confusion. Not sure what I was thinking earlier... in any case, there's some updates that'll come in the next deploy:

    • Added an 'even' and 'odd' class to each ul.categories li
    • Added a section-specific class to each ul.categories li

    So now you should get something like <li class="even section-setup_installation"> for the second category listed on our faqs page.

  8. Kyle Neath (GitHub Staff) closed this discussion on 04 Mar, 2009 05:23 AM.

Discussions are closed to public comments.
If you need help with Tender please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac