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
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Need help coding different pages of same site

    Hi, I'm new to the forum as I'm also very new to coding and am need of some help.

    I'm currently designing a page for a new webzine, and the creators want it to start off as a tumblr until (hopefully) it gains a following big enough to purchase an independent domain.

    I am trying to make separate pages for the differing sections (eg lifestyle, current affairs etc) with links from the front page. This has been successful so far, however, I am having trouble with coding the pages.

    I need the linked pages to have the same banner/header, links bar, and sidebar as the front page, but the content/posts section to have two-three columns, one post per column, instead of one single column for post entries.

    here is the url: http://getmilkmag.tumblr.com/

    Is this possible? Would anyone be able to help me achieve this?

    I really have no idea how to write that code myself, as like I said, I'm basically a novice and this is my (completely ignorant of coding) friends' project. I know tumblr's not proper coding haha but I am really really stuck and this project means a lot to all involved.

    Thanks in advance!
    Liv
    Last edited by livmc; 10-14-2012 at 01:29 AM.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,354
    Thanks
    23
    Thanked 618 Times in 617 Posts
    Split your html at the line that reads <div id="content">. Take everything above that place it in a file name 'main_1.html' or something similar. Take everything that's left and put it in a file called 'main_2.html'. main_1 is your header menu and right sidebar. These things will not change/ main_2 is your content that will change.

    Write a php file index.php containing this:
    PHP Code:
    <?php
    require ('main_1.html');
    require (
    'main_2.html');
    ?>
    If you don't want what's left after the </div> for <div id="content"> Make a third file and change the index.

    As for two ~ three columns. Right now your content is 552px wide. You could plave to columns at 250px wide in your content div and be ok. If you want to go to three columns I would suggest redoing the page at a width of 1000px.


  •  

    Posting Permissions

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