Results 1 to 7 of 7

Thread: Include files IN CSS layers

  1. #1
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Include files IN CSS layers

    I have the following code in my html body:
    <div id="Layer2">
    <!--#include file="service_release/test.htm" -->
    </div>
    <a href="#" onClick="MM_showHideLayers('Layer2','','show')">Download</a>

    <----------------------------->
    The style is defined in the head as:
    <style type="text/css">
    <!--
    #Layer2 {
    position:absolute;
    left:253px;
    top:12px;
    width:380px;
    height:413px;
    z-index:1;
    background-color:#CCCCCC;
    visibility:hidden;
    }
    -->
    </style>

    <----------------------------->
    The content of my "test.htm" file is exactly the following no body, head,etc.:
    <table width="100%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr>
    <td bgcolor="#999900"><span class="style1">TEST</span></td>
    </tr>
    </table>
    <----------------------------->

    I am using dreamweaver 8, everything shows up within the design view...but when I open the page up in IE, the content of the include file simply does not show.

    How can I include Files in my CSS layers ?
    Thanks

  2. #2
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    because that's SSI, not clientside inclusion: Either you should use AJAX content embeding, or your host ought to support SSI (I.e being Apache or compatible web server, and have +Includes option enabled, technically you could try creating .htaccess file with this:
    Code:
    <directory />
    Options +Includes
    </directory>
    Furthermore, it may just not want to work out of the box; from my experiences, you might also need XBitHack option enabled, but that's what only your provider can enable.

  3. #3
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    Is there another way I can include the file? maybe using javascript within the CSS layer?

  4. #4
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    AJAX, PHP, <object type=text/html>

  5. #5
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question

    My site is externaly hosted on a windows server.
    Maybe another way? through javascript?
    But I don't quite get it....

    doesn't CSS "allow" includes?

  6. #6
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    it allows @import rules, but that's for chunks of, for example media specific (print, portables), css styling

    What you're mistaking is that it has nothing to do with CSS, nor layer.
    You can use ASP directives to include external cunks of HTML on Windows machines, or you can request PHP, which can do it as well... other than that, there's only client-side option I just gave you: AJAX or<object>

  7. #7
    Join Date
    Dec 2004
    Location
    UK
    Posts
    2,358
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by ItsMeOnly
    it allows @import rules, but that's for chunks of, for example media specific (print, portables), css styling
    In other words, importing other style sheets.

    What you're mistaking is that it has nothing to do with CSS, nor layer.
    Yes. CSS is for suggesting presentation. The word "layer" means nothing in markup.

    You can use ASP directives to include external cunks of HTML on Windows machines, or you can request PHP, which can do it as well... other than that, there's only client-side option I just gave you:
    You've neglected to mention SSI (server-side includes), which is independent of any particular language or Web server implementation. There are also other languages besides ASP and PHP.

    AJAX or<object>
    Except that relying on AJAX isn't a good idea has it has relatively little support across browsers and is subject to security settings in IE. Moreover, the object element isn't well supported for uses beyond plug-ins (which is quite unfortunate). The only practical client-side option is frames (probably in-line frames; the iframe element).

    Mike

Bookmarks

Posting Permissions

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