views:

942

answers:

5

Hi all!

I am writing a webPage using asp.net and c#.

I want to divide my webpage into 2 columns such as in one I will have buttons that change the view in the other column, without "stepping on" the content of the first column. example:

button 1 | :) a picture...
button 2 |

I tried to use divisions but I think I'm not using them properly. any help would be great! thanks!!!

A: 

You want a table :)

<table>
<tr>
 <td>button 1</td>
 <td>a picture</td>
</tr>
<tr>
 <td>button 2</td>
 <td>...</td>
</tr>
</table>
Noon Silk
The table haters have come out in force.
Greg
A: 

You might try posting a bit of code so that we can see what is going on. It sounds like a css problem which is more general than asp.net and c#.

Scott
+1  A: 

Or code the divs like so:

<div class="wrapper">
  <div class="left">
    button 1
    button 2
  </div>

  <div class="right">
    a picture
  </div>
</div>

Then the css is:

.wrapper {
  width: 800px;
} 

.left {
  float: left;
  width: 200px;
}

.right {
  float: right;
  width: 600px;
}

You can change the widths to whatever you want, just make sure that .left width + .right width isn't greater than .wrapper width. Also make sure that the content of the columns doesn't make them wider (i.e. if your picture is wider than 600px, it'll also break the layout).

Pat
A: 

Hi again- thanks for the quick responds.

That is approx. all I have in my aspx... the rest of the code (images) that are supposed to be displayed in the right side are in a cs file (because I'm using GDI+ to display an graphics image- on the right side there supposed to be an image (all the time) an few more images that will display according to which image-button aill be clicked.

my cs file keeps on "stepping on" my aspx file and every type of division is displayed "up" and "down" and not "right" and "left".

does anyone know how to fix that? thanks for your help...

it didn't post my code: <form id="form1" runat="server"> <div style="width:50%;azimuth:far-left;"> <asp:ImageButton ... /> </div> <div style="width:50%;azimuth:far-right;" > </div> </form>
Don't answer your own question with more information, edit it into your original question
Neil Trodden
A: 

if you divide your page to two web page then you use frame in javascript for it's refrence go to www.w3schools.com