Image not displaying in sidebar

Topics: Themes
Aug 7, 2014 at 11:41 PM
Now I'm trying to add an image in my sidebar area. It's a small graphic, only 200px X 200px, and here is the code I've used to insert it:
<div id="northsidebar" class="sidebar">
                <div class="fixed" ><br /></div> 
                <div class="widget feeds_weight">
                    <center>
                        <img src="img/DJFiniteCD.png" alt="DJ Finite CD" height="200px"; width="200px"; />
                    </center>
                </div>
But it just won't load the image! I can see the Alt tag, and it does center correctly, but it absolutely won't load the image! Any suggestions on what I"m doing wrong with this? (I'm banging my head here - this should be simple!

As always, any help would be greatly appreciated. TIA,

Coleen
Aug 9, 2014 at 3:12 PM
Does anyone have any idea why this image won't display? Any help would be greatly appreciated. TIA,

Coleen
Aug 9, 2014 at 3:52 PM
Hi Coleenh
Try this code:
<img src="image.axd?picture=/img/DJFiniteCD.png" alt="DJ Finite CD" height="200px" width="200px" />
I see that you have ; after height and width that is not correct, this maybe the problem.
Aug 9, 2014 at 5:58 PM
Thanks ildrago. I guess I'm used to CSS coding, but I did try it without the semi-colons and no luck (sigh) I'm not sure why this won't work in the sidebar area because it works perfectly in my VS2010 version of it. Since BE 3.0 is not compatible with VS 2010, I created a "template" in VS 2010 to do my HTML and CSS coding before copying it to the WebMatrix I'm using to design the BE 3.0 in. All the .CSS and HTML works fine - except this! I think the difference is that in my "template" I am just using a two-column layout, no widgets or extra side-bar code. However, that really shouldn't matter just to display a graphic - should it?

Oh, one other thing doesn't work correctly - the Facebook "Like" plug-in. The code for that also works perfectly in my VS template, but once I paste the exact same code into the footer of my BE site on the WeMatrix, that doesn't work either. All I can think of is that being wrapped in layers of the widget somehow the code isn't reading the HTML or the CSS. I'm baffled. Any ideas? TIA!
Aug 11, 2014 at 5:13 AM
So, if I understood you need to show an image in sidebar that does not have widgets.
Well, try this: add a WIDGETZONE in the sidebar and put a TEXTBOX, next via HTML code, add your code image here, it should works!
Aug 11, 2014 at 7:01 PM
Well yes and no. The current sidebar does have some widgets - but I removed most of them because they aren't needed for what I'm using the blog for. So my widget code (at the moment) looks like this: (Note: I currently have the photo HTML remmed out)
        <div class="col2">
           <div id="sidebar">
                <div id="northsidebar" class="sidebar">
                <div class="fixed" ><br /></div> 
                <div class="widget feeds_weight">
                    <%-- <center>
                        <img src="image.axd?picture=/img/DJFiniteCD.png" alt="DJ Finite CD" height="200px" width="200px" />
                    </center>  --%>              
                </div>
                <blog:WidgetZone runat="server" ID="rightzone" />
                </div> 
           </div>
        </div>
I'll try adding a textbox and putting the code for the image there. Thanks.
Coordinator
Aug 11, 2014 at 8:41 PM
Edited Aug 11, 2014 at 10:01 PM
Why not "steal" the code to display images from standard theme?
// Custom/Themes/Standard/site.master
<img src="~/Custom/Themes/Standard/images/twitter.png" runat="server" />
Marked as answer by Coleenh on 8/11/2014 at 3:42 PM
Aug 11, 2014 at 11:42 PM
Rtur - you are my hero! Thank you so much! That was easy - why didn't I think of that? Thank you, thank you! :-)