Close

Results 1 to 6 of 6

Thread: Css

  1. #1
    DF Rookie vahid_nasiri's Avatar
    Join Date
    Sep 2002
    Location
    now on!
    Posts
    13
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Css

    Hi!

    I want to render the html file with cascading style sheets (*.css).
    Is there any way to repeat my default header or any thing like this
    by using css in one page?

    Example:


    Simple html layout:

    --------------
    Header
    --------------
    zxvzxvzxvzxv
    wafdasfasfasf
    wrwqrqwrqwr
    qwrqwrqwrwqr
    sd;lkfa;jf;la
    opwqropurqw[ri




    Rendered html layout by css :

    --------------
    Header
    --------------
    zxvzxvzxvzxv
    wafdasfasfasf
    wrwqrqwrqwr
    --------------
    Header
    --------------
    qwrqwrqwrwqr
    sd;lkfa;jf;la
    --------------
    Header
    --------------
    opwqropurqw[ri

  2. #2
    DF VIP Member
    RhinoBanga's Avatar
    Join Date
    Nov 2000
    Location
    127.0.0.1
    Posts
    1,780
    Thanks
    20
    Thanked:        13
    Karma Level
    388

    Default

    The Web Site Development / Development Kit forum would be more appropriate for this question dude:

    http://www.digital-forums.com/forum/...?s=&forumid=75

  3. #3
    VIP Member CzarJunkie's Avatar
    Join Date
    Jun 2001
    Location
    Atlantis
    Posts
    13,754
    Thanks
    832
    Thanked:        3,225
    Karma Level
    1992

    Default

    Explain yourself a little more m8, I work with CSS and HTML everyday and I've no idea what you mean.

    If you are wanting to build your pages with headers and footers that stay consistent then think about using SSI (Server Side includes), this will allow you to break pages innto sections and means less work when it comes to changing or editing parts of your site.

  4. #4
    DF VIP Member graham.edmon's Avatar
    Join Date
    May 2001
    Location
    Edinburgh
    Posts
    263
    Thanks
    0
    Thanked:        0
    Karma Level
    289

    Default

    As CzarJunkie says, its SSI (server side includes) you need not CSS.

    Put your files up to the server with a shtml extension, and put in the following into your pages that you want to include the header in

    PHP Code:
    <!--#include virtual="myheader.html" --> 

  5. #5
    DF VIP Member salvadorescobar's Avatar
    Join Date
    Dec 2000
    Location
    Huddersfield
    Posts
    951
    Thanks
    0
    Thanked:        0
    Karma Level
    345

    Default

    you could always write a simple javascript function that pumped out what you wanted to be contained within your header.

    PHP Code:
    <script language="JavaScript">

    function 
    pumpHead() { 
       
    document.write("<h3>Header Title</h3>");
       
    document.write("body goes here...");
    }

    </
    script
    Then, whenever you want to output this within your page just use...

    PHP Code:
    <script>
    pumpHead();
    </
    script
    Or whatever... syntax may not be perfect. This is a simple static solution. As both graham and CZ say a Server side solution should really be used for this although I understand that this is not always possible.

    ** you forgot to put your code in BB script tags, this prevents your example code from executing and causing Errors.

    GE.
    Last edited by graham.edmon; 18th October 2002 at 04:37 PM.
    'If we aren't meant to eat animals, then why are they made out of meat?'
    Anon.

  6. #6
    DF Rookie vahid_nasiri's Avatar
    Join Date
    Sep 2002
    Location
    now on!
    Posts
    13
    Thanks
    0
    Thanked:        0
    Karma Level
    0

    Default

    Thanks very much for reply

    I am writing an asp page to display all of the records in
    a table in one page and i want to print this larg page with
    formated syntax in IE .

Social Networking 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
  •