| Insert Image into CSS
|
BRoberson1657

msg:4397457 | 3:58 pm on Dec 13, 2011 (gmt 0) | I am trying to add a line of code so that an image appears in my website's sidebar. I am editing the "SIDEBAR" section. I've included a copy of the code I'm using, the actual file path of the image source, and a copy of the css page's complete code from top to bottom. Can anyone read this and tell me where my mistake is coming from? So far I am only getting it to acknowledge the ALT text but it omits the image....
My code looks like this: <img src="sidebar-ad1.png"; alt="New art is added daily! Don't forget to browse our templates for the newest in trends, styles and seasonal designs." /> ***NOTE - FILE PATH IF NEEDED*** ('App_Themes/Peacock/img/sidebar-ad1.png') ___________________________ ACTUAL FULL CODE FROM CSS: <%@ Master Language="VB" MasterPageFile="~/PrintnowDisplay.Master" AutoEventWireup="false" CodeBehind="PrintnowHomeDisplay.master.vb" Inherits="Printnow.PrintnowHomeDisplay" %> <asp:Content ID="Content1" ContentPlaceHolderID="cpHead" runat="server"> <asp:ContentPlaceHolder ID="cpHead" runat="server" /> </asp:Content> <asp:Content ID="Content2" ContentPlaceHolderID="cpMainBody" runat="server"> <div class="maincontenthome"> <asp:Panel ID="pnlBanner" runat="server"> <asp:ContentPlaceHolder ID="cpBannerContent" runat="server" /> </asp:Panel> <asp:Panel ID="pnlMainContent" runat="server" CssClass="homecontent"> <asp:ContentPlaceHolder ID="cpMainContent" runat="server" /> </asp:Panel> </div> <asp:Panel ID="pnlSidebar" runat="server" CssClass="sidebar"> <asp:ContentPlaceHolder ID="cpSideBar" runat="server" /> <img src="sidebar-ad1.png"; alt="New art is added daily! Don't forget to browse our templates for the newest in trends, styles and seasonal designs." /> </asp:Panel> <div style="clear: both"></div> </asp:Content> <asp:Content ID="Content3" ContentPlaceHolderID="cpTitleBar" runat="server"> <asp:ContentPlaceHolder ID="cpTitleBar" runat="server" /> </asp:Content> ____________________________
|
alt131

msg:4398333 | 6:29 pm on Dec 15, 2011 (gmt 0) | Hi BRoberson1657, couple of suggestions: Just note this isn't the css file, it's asp - you are coding in the img element, not using css to style it. I don't expect this will be causing the problem, but check the <img> and remove that stray semi-colon: <img src="sidebar-ad1.png" ; <---- Finally, have you checked the image is in the right directory/folder or that you have provided the correct path in the image src?
|
rocknbil

msg:4398734 | 5:12 pm on Dec 16, 2011 (gmt 0) | Look at this, <img src="sidebar-ad1.png"; .... now this, ***NOTE - FILE PATH IF NEEDED*** ('App_Themes/Peacock/img/sidebar-ad1.png') and answer: What page is calling this? default.asp <- won't work themes/default.asp <- won't work App_Themes/Peacock/img/default.asp <-- WILL work Give this a shot, which should work wherever you are: <img src="/App_Themes/Peacock/img/sidebar-ad1.png"; ....
|
BRoberson1657

msg:4398760 | 6:46 pm on Dec 16, 2011 (gmt 0) | That did it. Web Masters save the day again. Thanks so much!
|
|
|