DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/)
-   Site Layout and Usability (http://www.daniweb.com/forums/forum130.html)
-   -   Alternative approach to frames....? (http://www.daniweb.com/forums/thread115355.html)

cyberwizmj Mar 23rd, 2008 6:21 pm
Alternative approach to frames....?
 
1 Attachment(s)
Attachment 5558

I am a beginner with asp.net. I want to make a menu towards the left with content area towards the right. Just simple clicking link in the left frame and displaying data in the right frame.. only that I don't want to use frames and I'd like the menu to not to scroll up with the content on the right. Also, I can't use ajax controls, don't want to use flash and don't know java too well...

In the website I wanted to put link buttons/image buttons in the menu to display data in a gridview.

Any type of approach to do the above is welcome.. css/css2,tables,master pages, little bit of this n that, etc...

Thanks in advance :)

lio04 Mar 23rd, 2008 9:31 pm
Re: Alternative approach to frames....?
 
Very easy way is use <div id> tags and extern style.css file.

e.g. this code in HTML file:

In header:
<link rel="stylesheet" type="text/css" href="style.css" />

Body:
<body>
<div id="container">
       
        <div id="menu">
        blah blah
        </div>

        <div id="content">
        blah blah
        </div>
</div>
</body>

and CSS:
#container {
  width: 500px;
  margin: 0 auto;       
}
 

#menu {
  width: 200px;
  height: 600px;
  float: left;
  background-color: #c6d9f0;
  }

#content {
  width: 300px;
  height: 600px;
  float: left;
  background-color: #ffffff;
}

I hope, that I understand right, what you want. :)

cyberwizmj Mar 24th, 2008 5:27 am
Re: Alternative approach to frames....?
 
How do I open new pages in the content area?

lio04 Mar 24th, 2008 9:46 am
Re: Alternative approach to frames....?
 
e.g. with PHP function inserted in content:

<?php
        $menu = $_GET['menu'];
        if ($menu=="") $menu=index;
        $filename="_".$menu.".php";
        include "$filename";
        ?>

In menu can be
<a href="index.php?menu=articles">Articles</a><br>

if is file named _articles.php .

cyberwizmj Mar 24th, 2008 11:43 am
Re: Alternative approach to frames....?
 
unfortunately my server doesn't support php... :(


All times are GMT -4. The time now is 3:44 pm.

Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC