www.webdeveloper.com
Results 1 to 4 of 4

Thread: reusing <div> sections

  1. #1
    Join Date
    Feb 2012
    Location
    Northeast Ohio
    Posts
    2

    reusing <div> sections

    Hello all,

    This is my first post! I know just enough css to reuse-by-example, but not enough to actively know what I'm looking for when I need to do something new. *sigh*

    Here is the problem:

    I have a <div. . .> </div> section that I use in numerous pages. It is identical in each. For example:

    <div class="Mydivclass">
    The actual words in this division are identical on numerous pages, but it is very lengthy
    <div class="Mysubdivclass">
    . . . as are these words as well.
    </div>
    </div>

    The properties (position, width, height, etc.) of the div and sub-div are specified in a .css file.

    Currently, I am simply copy/pasting it onto each .html page. How can I reuse this on each page without copy/pasting the entire thing?

  2. #2
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    For that you have to use SSI (Server Side Includes) using any of the Server Side Scripting Languages viz. ASP.NET, PHP etc.

    And of course your pages won't remain .html anymore and would become .asp or .php!

    So, learn any Server Side Language!

    All the best!
    "It will never rain roses: when we want to have more roses, we must plant more roses." - George Eliot

  3. #3
    Join Date
    Feb 2012
    Location
    Northeast Ohio
    Posts
    2
    Rats. Ok! Thank you!

  4. #4
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194

    resolved

    Quote Originally Posted by paradoxresolved View Post
    Rats. Ok! Thank you!
    You are welcome!
    "It will never rain roses: when we want to have more roses, we must plant more roses." - George Eliot

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles