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 2 of 2
  1. #1
    rip
    rip is offline
    New Coder
    Join Date
    Mar 2005
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Div problem and layout issues

    Ok, I'm not sure exactly how to explain this, but I'll do my best.

    I have a header file which is the main file where my page is displayed. It contains my top, left, and right columns that are static and are displayed no matter what link you go to on my site.

    The middle content varies and is set as an automatic width to stretch when the window is resized.

    When you click on a link, the middle column is the only content that changes and it is displayed and coded in multiple files.

    I'll put some of the code I have on here to try to explain more of what my problem is.

    Here is part of the relevant code from my css file first:

    Code:
    div.leftColumn {
     background: transparent;
     border: 0px solid #555;
     left: 10px;
     padding: 5px;
     position: absolute;
     top: 246px;
     width: 240px; /* Incorrect IE5 value */
     z-index: 2;
     voice-family: "\"}\"";
     voice-family: inherit;
     width: 218px;
    }
    
    div.topColumn {
     background: transparent;
     border: 0px solid #555;
     margin: 0px 170px 0px 0px;
     text-align: center;
     min-width: 900px;
     padding: 0px;
     position: relative;
     width: auto;
     z-index: 3;
    }
    
    div.middleColumn {
     background: transparent;
     border: 0px solid #555;
     margin: 36px 420px 10px 240px;
     min-width: 200px;
     padding: 5px;
     position: relative;
     width: auto;
     z-index: 3;
    }
    
    div.rightColumn {
     background: transparent;
     border: 0px solid #555;
     padding: 5px;
     position: absolute;
     top: 246px;
     float: right;
     right: 190px;
     width: 240px; /* Incorrect IE5 value */
     z-index: 1;
     voice-family: "\"}\"";
     voice-family: inherit;
     width: 218px;
    }
    Here is the relevant parts of my header file:

    Code:
    <div class="topColumn">BANNER CODE</div>
    <div class="leftColumn">
      CODE HERE
    </div>
    <div class="rightColumn">
      CODE HERE
    </div>
    Now in the middle column I have this basic setup:

    Code:
    <div class="middleColumn">
      CODE HERE
    </div>
    Now my question is, is there someway I can "call" this middle column file inside the header file in order to fix some layout issues I have as I don't want to use absolute positioning. Or is there some other way to do this?

    Example header file

    Code:
    <div class="topColumn">BANNER CODE</div>
    <div class="leftColumn">LEFT COLUMN CODE</div>
    
    CALL MIDDLE COLUMN CODE HERE
    
    <div class="rightColumn">RIGHT COLUMN CODE</div>

    You can see what I'm trying to fix here: www.eyeongames.com


    Thanks in advance for any help with this!
    Webmaster - Eye On Games

  • #2
    Regular Coder
    Join Date
    Jul 2004
    Location
    mile high city
    Posts
    482
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you're using php includes, you can call one from within another.

    So your main page includes the header, and the header in turn includes 'MIDDLE COLUMN'.

    Depending on your needs, it could be easiset to just hard code 'MIDDLE COLUMN' into the header.
    Computer, kill Flanders... Did I hear my name? My ears are burning...
    Good start. Now finish the job.


  •  

    Posting Permissions

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