Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 12 of 12
  1. #1
    New Coder
    Join Date
    Aug 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    [HELP] #Include problems

    Any known problems with CSS and the #Include tag? Seems everytime I try to change the BG Color in the file that's being called it fails to show up when I visit the live site. Very frustrating.

  • #2
    Senior Coder
    Join Date
    Dec 2002
    Location
    Arlington, Texas USA
    Posts
    1,062
    Thanks
    4
    Thanked 8 Times in 8 Posts
    are you including the css file? or do you have a include file that has it's own css that it isn't adhering to? Or is the include file not following the style sheet for the page?

  • #3
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Could you post your code for us to look at?

  • #4
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by vcp105
    Any known problems with CSS and the #Include tag? Seems everytime I try to change the BG Color in the file that's being called it fails to show up when I visit the live site. Very frustrating.
    View the source when the page loads and see if the css is included properly. And did you wrap style tags around the include? Because if you just included the css file alone.... you would have to put a style tag around the include so that the browser will pick it up and read it as css
    I'm gonna find a way to download the internet if its the last thing I do...
    Prepare to bow down to me (or my grave) and call me almighty when the algorithm is finished

  • #5
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Unless you are doing some dynamic CSS inserting, you should just use html code.
    Code:
    <html>
    <head>
    <title>My page</title>
    <link rel="stylesheet" type="text/css" href="includes/styles.css" />
    </head>
    <body>
    ...
    </body>
    </html>

  • #6
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    And don't know if the page is being rendered from a cache and if so perhaps something like this toward the top of the page may help:

    Code:
    <%
    Response.Expires = -1000	' Make browser not cache pg.
    %>
    And I actually put something like the above on most all my database-oriented Web pages.
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  • #7
    New Coder
    Join Date
    Aug 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Code

    <%set rsbanner=cnconn.execute("select * from nevis_top_banner where status =1 order by newID()")
    if not rsbanner.eof then

    topimage=rsbanner("banner")
    topText=rsBanner("text")

    topsite = Trim(rsBanner("site"))

    if Instr(topsite,"http://") >0 then
    strUrl = topsite
    else
    strUrl = "http://" & topsite
    end if
    End if
    rsbanner.close
    set rsbanner=nothing%><%if topimage<>"" then %>
    <script language="JavaScript" type="text/JavaScript">
    <!--
    function MM_reloadPage(init) { //reloads the window if Nav4 resized
    if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
    else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
    }
    MM_reloadPage(true);
    //-->
    </script>

    <%ENd if%>
    <style type="text/css">
    <!--
    .style1 {font-size: x-small}
    -->
    </style>

    <a href="<%=strUrl%>"><img src="<%=strPath%>images/TopImages/<%=topimage%>" border="0" width="700" alt="<%=topText%>" height="90"></a>
    <table width="90%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFCC00">
    <tr>
    <td> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="text2">
    <tr>
    <td colspan="2" valign="top"><table class=text3 width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <%'THIS TD WILL HAVE A LOGIN AS WELL AS MYADMIN TAB%>
    <%IF Session("UserName") = "" Then%>
    <%else%>
    <td>
    <table class="text3" width="100%" border="0" cellspacing="0" cellpadding="2">
    <tr>
    <td align="right" valign="middle">
    <%
    if Session("MemberID") <> "" or Session("empID") <> "" then
    if Session("FeaturedAgent") then %>
    <a href="<%=strPath%>Agents/viewprofile.asp" class="lnk"><img src="<%=strPath%>images/myadmin-img.gif" width="80" height="24" border="0"></a>
    <% elseif Session("FeaturedJobs") then
    if session("Seeker") = "JS" then%>
    <a href="<%=strPath%>JobSeekers/jobskeer-my-admin.asp" class="lnk"><img src="<%=strPath%>images/myadmin-img.gif" width="80" height="24" border="0"></a>
    <%elseif session("Employer") = "JE" then%>
    <a href="<%=strPath%>JobsEmployer/my-admin.asp" class="lnk"><img src="<%=strPath%>images/myadmin-img.gif" width="80" height="24" border="0"></a>
    <%elseif session("Employer")="" and session("Seeker")="" then %>
    <a href="<%=strPath%>Jobs/viewprofile.asp" class="lnk"><img src="<%=strPath%>images/myadmin-img.gif" width="80" height="24" border="0"></a>
    <%end if%>
    <%elseif Session("FeaturedBusiness") then %>
    <a href="<%=strPath%>Business/viewprofile.asp" class="lnk"><img src="<%=strPath%>images/myadmin-img.gif" width="80" height="24" border="0"></a>
    <%end if %>
    <a href="<%=strPath%>logout.asp"><img src="<%=strPath%>images/logout-img.gif" width="79" height="24" border="0"></a>
    <%end if%></td>
    </tr>
    <tr>
    <td height="30" align="right"><strong>
    <%if Session("MemberID") <> "" or Session("empID") <> "" then%>
    <font color="#FF0000"><strong>Welcome <font color="#FF0000"><strong><%=Session("FirstName") %></strong></font></strong></font>
    <%else%>
    Welcome User
    <%end if%>
    </strong> </td>
    </tr>
    </table></td>
    <%end if%>
    </tr>
    </table></td>
    <td width="10" valign="top">&nbsp;</td>
    </tr>
    <div style="z-index:0"> <tr>
    <td width="609" valign="top" bgcolor="#FFCC00"><img src="<%=strPath%>images/nevisbizlogo.gif"></td>
    <td width="265" valign="top" bgcolor="#FFCC00">
    <form name="frmMemberLogin" method="post" action="<%=strPath%>chkmemberlogin.asp" onSubmit="return ValidateForm(this)">
    <table class="text3" width="100%" border="0" cellspacing="0" cellpadding="2">
    <tr>
    <td><img src="<%=strPath%>images/NBmember-login-new.gif"></td>
    </tr>
    <tr>
    <td>
    <table class="text3" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
    <td width="45"><img src="<%=strPath%>images/NBuser-id.gif"></td>
    <td width="88"><input name="TR_UserID" type="text" class="inp" size="10" maxlength="50"></td>
    <td width="54"><img src="<%=strPath%>images/NBpassword-new.gif"></td>
    <td width="74"><input name="TR_Password" type="Password" class="inp" size="10" maxlength="20"></td>
    </tr>
    </table></td>
    </tr>
    <tr>
    <td><table class="text3" width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>

    <td width="65">
    <input name="imageField" type="image" src="<%=strPath%>images/NBlogin-button.gif" border="0">
    </td>

    <td width="249" class="style1"><a href="<%=strPath%>registration.asp" class="lnk">New Registration?</a>&nbsp;&nbsp;&nbsp;<a href="<%=strPath%>forgotpassword.asp" class="lnk">Forgot Password</a></td>
    </tr>
    </table></td>
    </tr>
    </table></form> </td>
    </div>
    <tr><td colspan="2" valign="top"><a href="http://www.nevisbiz.com"><img src="../images/nevisbizmasthead2_r2_c1.gif" width="69" height="29" border="0"></a>
    <img src="../images/nevisbizmasthead2_r2_c2.gif" width="10" height="29"> <a href="http://www.nevisbiz.com/news"><img src="../images/nevisbizmasthead2_r2_c3.gif" width="48" height="29" border="0"></a> <img src="../images/nevisbizmasthead2_r2_c4.gif" width="15" height="29"><a href="http://www.nevisbiz.com/agents"><img src="../images/nevisbizmasthead2_r2_c5.gif" width="85" height="29" border="0"></a><img src="../images/nevisbizmasthead2_r2_c6.gif" width="16" height="29"><a href="http://www.nevisbiz.com/business"><img src="../images/nevisbizmasthead2_r2_c7.gif" width="135" height="29" border="0"></a><img src="../images/nevisbizmasthead2_r2_c8.gif" width="13" height="29"><a href="http://www.nevisbiz.com/jobs"><img src="../images/nevisbizmasthead2_r2_c9.gif" width="44" height="29" border="0"></a><img src="../images/nevisbizmasthead2_r2_c10.gif" width="12" height="29"><a href="http://www.nevisbiz.com/technology"><img src="../images/nevisbizmasthead2_r2_c11.gif" width="94" height="29" border="0"></a><img src="../images/nevisbizmasthead2_r2_c12.gif" width="12" height="29"><a href="http://nevisbiz.com/csme"><img src="../images/nevisbizmasthead2_r2_c13.gif" width="46" height="29" border="0"></a><img src="../images/nevisbizmasthead2_r2_c14.gif" width="10" height="29"><a href="http://www.nevisbiz.com/sports"><img src="../images/nevisbizmasthead2_r2_c15.gif" width="57" height="29" border="0"></a><img src="../images/nevisbizmasthead2_r2_c16.gif" width="15" height="29"><a href="http://www.nevisbiz.com/politics"><img src="../images/nevisbizmasthead2_r2_c17.gif" width="113" height="29" border="0"></a></td>
    <!-- <img src="<%=strPath%>images/directory.gif" width="84" height="26" border="0"> -->
    </tr>
    </table>

    <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E8B620" class="text3">
    <tr>

    <td width="760" valign="middle">
    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="text2">
    <tr>
    <form name="frmSearch" method="post" action="<%=strPath%>search.asp" onSubmit="return ValidateForm(this)">
    <td width="52"><img src="<%=strPath%>images/NBsearch.gif"></td>
    <td width="125">
    <select name="TR_Search_Feature" class="inp">
    <option>Select</option>
    <option value="1" <%If intSearchFeature =1 then%>Selected<%end if%>>Business Directory</option>
    <option value="2" <%If intSearchFeature =2 then%>Selected<%end if%>>Jobs</option>
    <option value="3" <%If intSearchFeature =3 then%>Selected<%end if%>>RealEstate Agents</option>
    </select>
    </td>
    <td width="140">
    <input name="txtKeyWords" type="text" class="inp">
    </td>
    <td><input name="imageGo" type="image" src="<%=strPath%>images/NBgo.gif" border="0"></td></form>
    <td><input name="imageHelp" type="image" src="<%=strPath%>images/NBhelp.gif" border="0" onClick="window.open('<%=strPath%>help.asp','','width=400;height=600;location=0,scrollbars=1,left=15 0,top=200')"></td>
    </tr>
    </table></td>

    <td width="116" align="right">&nbsp;</td>
    </tr>
    </table>

    </td>
    </tr>
    </table>

  • #8
    New Coder
    Join Date
    Aug 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update

    Thanks for the responses so far guys - now here's the latest thing that happened - I changed the path for some of the image files to e.g. <img src="../images/nevisbizmasthead2_r2_c6.gif" width="16" height="29">

    then suddenly my top menu disappears - take a look at these two pages to get a sense for whats happening:

    http://www.nevisbiz.com
    http://www.nevisbiz.com/business/

    You will note that the site index page is fine but all the other pages the menu fails to show up - Might the path for these images have anything to do with this problem??? THANKS in advance.

  • #9
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    If you want the images to be visible from pages located in two different folders at two different levels (in the main folder and in the business folder) then you're not going to want to use a relative URL.

    So perhaps change this:

    <img src="../images/nevisbizmasthead2_r2_c6.gif" width="16" height="29">

    To be more like this instead:

    <img src="http://www.mysite.com/images/nevisbizmasthead2_r2_c6.gif" width="16" height="29">
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  • #10
    New Coder
    Join Date
    Aug 2005
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Brilliant

    That works - Brilliant! Thanks!

  • #11
    Regular Coder
    Join Date
    Aug 2002
    Location
    USA
    Posts
    478
    Thanks
    0
    Thanked 2 Times in 2 Posts
    You're welcome and of course glad to hear it worked!
    J. Paul Schmidt
    www.Bullschmidt.com - Freelance Web and Database Developer
    www.Bullschmidt.com/DevTip.asp - Classic ASP Design Tips

  • #12
    Regular Coder
    Join Date
    Sep 2004
    Posts
    152
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You can also drop the full url and just do this:
    Code:
    <img src="/images/nevisbizmasthead2_r2_c6.gif" width="16" height="29">
    If you start a src attribute with "/" it knows to start at the root of your site, so the images folder would have to visible from the root (which it looks like it is since you are fully qualifying it that way).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •