Custom classes in generated lists.
-
Hey again. Seem to be living here today.
I have another issue. I’m using the recent posts widget in the sidebar. It’s positioned manually with css to not be in a sidebar state.
Right now I have it displaying two of the most recent posts.
What I’m trying to do is style the second most one in the list differently
than the first. ie different background, etc.I have the php generating my author image, and post time. But if my titles to big or long it pushes my meta tags down.
I need to be able to set the ul to relative, than be able to position my li’s absolutely so they stay in place regardless of title size.
Example of my li markup from default-widgets.php
<li><a href="<?php the_permalink() ?>" title="<?php echo esc_attr(get_the_title() ? get_the_title() : get_the_ID()); ?>"><?php if ( get_the_title() ) the_title(); else the_ID(); ?><div class="the-author"><?php c2c_the_author_image(); ?></a><div class="posted-on"><p>Posted: <?php the_modified_time('F j, Y'); ?> at <?php the_modified_time('g:i a'); ?></p></div> </li>
Thanks!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Custom classes in generated lists.’ is closed to new replies.