www.webdeveloper.com
Results 1 to 5 of 5

Thread: Best way to display content?

  1. #1
    Join Date
    Jun 2012
    Posts
    1

    Best way to display content?

    Hey all,

    I have been using Photoshop to design and (basic framework) code my websites. The easiest way I have found to display pages is to use an iframe, but this is not optimal for many reasons (that I am sure I do not have to explain).

    I tried searching for a better way but I feel like my lack of results is because I am not using the right search terms. I downloaded some free templates in hopes of taking apart the code and learning there but they all seems to be set up in such a way that if I make a change in the navigation bar on one page, I have to open up every other page and change the code the same way (wheras when using iframes this does not need to be done because the main page always stays the same).

    So I guess my question is what is the best way to display content?

    Thanks in advance,
    Blake

  2. #2
    Join Date
    Jun 2006
    Location
    Boston, MA
    Posts
    383
    what exactly are you trying to do? i.e. create a website where you can edit the navigation once and it changes across the site without messing anything else up and so forth?

    if so, the easiest method would probably be php includes. this is what im talking about here: http://php.about.com/od/tutorials/ht/template_site.htm


    yea, most pre-made templates are not for the faint of heart, i prefer to code from scratch so i know where everything is and what exactly everything does.
    "Problems cannot be solved by the same level of thinking that created them.

  3. #3
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    I'd suggest you avoid using PhotoShop code and instead learn basic HTML and CSS, for styling the content:
    http://www.w3schools.com/html/html_basic.asp
    and
    http://www.w3schools.com/css/css_intro.asp
    The best way to display content is to use correctly formed code, based on what's covered in the above links.
    As you build your page, validate that code often so you are not building one error on another:
    http://validator.w3.org/
    As for navigarion on multiple pages, you might want to use .php "includes"
    http://php.net/manual/en/function.include.php
    http://www.tizag.com/phpT/include.php
    of course if you use includes, you must also use a .php file extention.
    Best wishes,
    Eye for Video

  4. #4
    Join Date
    Jun 2006
    Location
    Boston, MA
    Posts
    383
    hehe i remember back in the day, outputting html from photoshop, i still do it today but only for emailer templates. just because its quick and easy
    "Problems cannot be solved by the same level of thinking that created them.

  5. #5
    Join Date
    Mar 2012
    Posts
    1,236
    Be aware that if you use .PHP doc extension, you cannot test your code by opening it with your browser. You need to either:
    1. Test on line (not recommended).
    2. Set up a local host and test using that (recommended).

    I use WAMP. It is free, simple to set up and use, and will work across a local network if required. However, that said, PHP adds a layer of complexity over HTML/CSS. I'd seriously suggest that you learn HTML/CSS first before you consider using PHP. I've been coding web sites for four years and am just starting out on PHP. Any menu changes I still have to propagate across all the web pages by hand! PHP include files are (probably) my next project.
    Last edited by jedaisoul; 06-25-2012 at 03:20 AM.

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