Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Matt Mullenweg

    (@matt)

    You’re confusing content and presentation. get_archives returns a list because that is what the content semantically is. That’s the way it should be structured.
    You can use CSS to format this list however you want, removing the bullets, changing the spacing, changing padding, really whatever you want, and you have infinite more flexibility than if it had been returned a series of lines with
    s between them.
    For example, if you want to display that list horizontally, if it was returned by default with line breaks in a paragraph or whatever you would have to go into the code and mess it up. You should never have to touch that function. With the way we do it you can add one simple rule to your CSS file (like #archives li { display: inline; }) to achieve the desired presentational effect.

    Hmmm…. This might be a good addition to the documentation as we work on it. “CSS Tips & Tricks”. We could come up with some “cookbook” CSS recipes — “If you want archive links to look like this, add this rule….”, etc.

    Moderator Matt Mullenweg

    (@matt)

    That would be a great tutorial.

    Anonymous

    Allusion: I hope you haven’t forgotten my wee email proposal thing. I’m working on it on my free time and I’d have a draft ready for emailing by Sunday, barring personal catastrophes.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘li tags in get_archives’ is closed to new replies.