link to your site, please
Thread Starter
lhk
(@lhk)
Hi there,
what for? As far as I understand things by now, I will have to write both sidebar-relevant CSS and sidebar.php from scratch to achieve what I want.
What currently puzzles me is WHERE I need to look. There are snippets in the CSS file, snippets in the sidebar.php and there has to be formatting somewhere else, or I wouldn’t get indented lists e.g. for links without any formatting applied to it in CSS and in sidebar.php.
In HTML I’d simply add a <br> after each line and be done with it. That would even work with categories, pages and links, but certainly not with the dynamic parts like the archives.
Is the list generated by WP’s template tags? If so, look up the documentation to see if you could print them not in list
http://codex.wordpress.org/Template_Tags
To me it’s easier to just adjust the CSS. Just set the margin and/or padding of the appropriate element to zero. Just figure it out yourself if you give me no link to your site.
Thread Starter
lhk
(@lhk)
This is the sidebar code:
<div id=”sidebar”>
<h2><?php _e(‘Categories’); ?></h2>
<?php list_cats(0, ‘all’, ‘name’, ‘asc’, ‘asc’, 1, 0, 1, 1, 1, 1, 0,”,”,”,”,”); ?>
<?php wp_list_pages(‘title_li=<h2>’ . __(‘Pages’) . ‘</h2>’ ); ?>
<li id=”calendar”><h2>Kalender</h2>
<?php ec2_get_calendar(); ?>
- <?php _e(‘Termine:’); ?>
<?php ec2_get_events(5,’j F’); ?>
<h2><?php _e(‘Archive’); ?></h2>
<?php wp_get_archives(‘type=monthly’); ?>
<?php include (TEMPLATEPATH . ‘/searchform.php’); ?>
<?php get_links_list(); ?>
<h2><?php _e(‘Admin’); ?></h2>
<?php wp_register(); ?>
<?php wp_loginout(); ?>
<?php wp_meta(); ?>
</div>
I’ve commented out everything except the
ul from CSS and everything is set to zero and none. I still get formatting and indentations (links, searchform, calendar). I’ve e.g. looked at links.php in the includes, but fail to pinpoint where exactly this may format the links list.
Go to your style.css file, if you study it you’ll notice that it’s split into sections. Find the section’Begin Lists’ and look for:
#sidebar ul ul, #sidebar ul ol {
margin: 5px 0 0 10px;
}
Change the ’10px’ to ‘0’ – that should get rid of the indent.
To remove the » in front of the list items, under the same section look for:
.entry ul li:before, #sidebar ul ul li:before {
content: "0BB 020";
}
and remove the ‘content’ parameter.
If you want to edit css I suggest you get the firefox developer extension here. I had no idea until my brother clued me in on it, but after learning how to use that, figuring out css has been like coming out of the dark ages.
Good luck!
Thread Starter
lhk
(@lhk)
Worked for the lists – great! And thanks!
Now I have but to find a means to get the calendar and the searchform to flush 😉