• Resolved rookcifer

    (@rookcifer)


    I am wondering how I can place my RSS icons (one for the RSS and one for e-mail) side by side. For example, I want them placed on the same line like this:

    [icon A] [icon b]

    Right now they are placed like this:

    [icon A]
    ———-
    [icon b]

    and they have a list style border separating them (which I don’t want). Also, I want them to be clickable, of course.

    Do I need to put code in a text widget or do I need to modify the theme itself? If so, what code do I need? It can’t be that hard, but I have searched and searched HTML tutorials and cannot find anything on the horizontal positioning of two images.

    Any help will be greatly appreciated.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Images “naturally” display horizontal. The case might be that you html looks something like this:

    <li><a href="#"><img src="path/rss-1.gif"></a></li>
    <li><a href="#"><img src="path/rss-2.gif"></a></li>

    The first thing that I would try is to do the following:

    <li>
        <a href="#"><img src="path/rss-1.gif">
        <a href="#"><img src="path/rss-2.gif">
    </li>

    If this doesn’t work for you, please post a link to your site.

    Thread Starter rookcifer

    (@rookcifer)

    Whenever I insert that code into my r_sidebar.php, nothing shows up. Whenever I enter it into my widget box, it scrunches up everything below it, and the images are still aligned vertically.

    here is my site if you want to take a look. I am trying to get those two green icons on the top right to align.

    The issue here lies in your stylesheet your-theme/style.css. This bit of code:

    #r_sidebar ul li a {
    	display: block;
    	color: #000000;
    	text-decoration: none;
    	margin: 0px;
    	padding: 5px 0px 5px 0px;
    	border-bottom: 1px solid #C0C0C0;
    	}

    is making *all* of the links in the “right” sidebar display block level. I would try creating a new class maybe like this:

    .inline{display:inline;}

    and then applying this class to the two links – like this:

    <a class="inline" href="https://feeds.feedburner.com/tasthius" title="Subscribe to my feed" rel="alternate" type="application/rss+xml">

    also, you can ditch the border by deleting the following code from the css above:
    border-bottom: 1px solid #C0C0C0;

    Thread Starter rookcifer

    (@rookcifer)

    Thanks a million! I’m going to go try it. I figured it was a problem in the stylesheet, but didn’t know what to do.

    While I have you here, can you tell me if I can alter my RSS feeds on the right sidebar (bottom) to show more than headlines? I’m using the KB advanced widget.

    Thanks again.

    Thread Starter rookcifer

    (@rookcifer)

    Ok as for the above code, here is what I have done:

    css:

    #r_sidebar ul li a {
    display: block;
    .inline{display:inline;}
    color: #000000;
    text-decoration: none;
    margin: 0px;
    padding: 5px 0px 5px 0px;
    }

    look OK?

    as for the widget:

    <a class="inline" href="https://feeds.feedburner.com/tasthius" title="Subscribe to my feed" rel="alternate" type="application/rss+xml"><img src="/wp-includes/images/rss.gif" alt="" style="border:0">
    <a class="inline" href="https://www.feedburner.com/fb/a/emailverifySubmit?feedId=1488173&amp;loc=en_US"><img src="/wp-includes/images/mail-icongreen.png" alt="" style="border:0">

    I tried this combo and it didn’t fix it, but I am sure I have done something wrong.

    html is good

    css needs a little help:

    the .inline should not go where it is. try this:

    #r_sidebar ul li a {
    	display: block;
          	color: #000000;
    	text-decoration: none;
            margin: 0px;
    	padding: 5px 0px 5px 0px;
    	}
    #r_sidebar ul li a.inline{display:inline;}
    #r_sidebar ul li a.inline img{padding:10px 10px 0 0;}

    This will make the images appear side by side.
    Let me know how it works.

    Thread Starter rookcifer

    (@rookcifer)

    Ok, mfields, I got it to work. The only thing I added was <center> tags in my widget to align the icons. It looks good, and is something I have been trying to do for a few days.

    I assume the same type of code can be used for tag clouds?

    Thanks again.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to place images side by side in the sidebar?’ is closed to new replies.