Showing posts with label setting. Show all posts
Showing posts with label setting. Show all posts

Saturday, March 31, 2012

Table width, height setting is not working.

I am trying to divide a main page by 2 like 50% top and 50% bottom. So I tried like a code below but it doesn't divide by 50:50. It seems like 70:30. Does anybody know why it does this?
<asp:Table ID="Table1" runat="server" Width="100%" Height="100%" cellpadding="0" cellspacing="0"> <asp:TableRow ID="TableRow1" runat="server" Width="100%" Height="100%"> <asp:TableCell ID="TableCell1" runat="server" Width="100%" Height="50%">
      ...    </asp:TableCell>        <asp:TableCell ID="TableCell1" runat="server" Width="100%" Height="50%">
      ...    </asp:TableCell> <asp:TableRow><asp:table>
That was wrong code I got above. Here's the right one.
<html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Untitled Page</title></head><body> <form id="form1" runat="server"> <asp:Table ID="Table1" runat="server" Width="100%" Height="100%" cellpadding="0" cellspacing="0"> <asp:TableRow ID="TableRow1" runat="server" Width="100%" Height="50%" > <asp:TableCell ID="TableCell1" runat="server" Width="100%" Height="100%" BackColor="red" > </asp:TableCell> </asp:TableRow> <asp:TableRow ID="TableRow2" runat="server" Width="100%" Height="50%"> <asp:TableCell ID="TableCell2" runat="server" Width="100%" Height="100%" BackColor="blue"> </asp:TableCell> </asp:TableRow> </asp:Table> </form></body></html>

Another question.

With the code above, even thought I specified the height to 50% to each, it only shows for one row not the whole page.

Please tell me how to divide a page into top half and bottom half so when I set background colors for each half, I can see the division by color.

 _____________________________________| || || || Red || || ||_____________________________________|| || || || Blue || || ||_____________________________________|To set like this.

Wednesday, March 28, 2012

Tables and column sizes

What do I have to do to get a column in a table to stay the same size no
matter what is in the other tables?
I've tried setting the width in px, in percentages, and nothing seems to
work; for example, the columns that are colored #cccccc I want to stay the
size of the menu control, which doesn't change.
However, if the column to the right of it, with the ucGeneral and ucDetails
controls, has nothing in it, or something very small, the #cccccc column
spreads out and I don't want it to do that. What's the secret.
<table runat=server bgcolor=white border=0 bordercolor=black height="100%"
width="100%" cellspacing=0 cellpadding=0 ID="Table1">
<tr height="10%" width="100%">
<td colspan=5><uc1:ucHeader id=UcHeader1
runat="server"></uc1:ucHeader></td>
</tr>
<tr valign=top>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
id=UcMenu1 runat="server"></uc1:ucMenu></td>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
<td bgcolor="white" rowspan=3> </td>
</tr>
<tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
<tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
id=UcDetails1 runat="server"></uc1:ucDetails></td>
</tr>
</table>
Thanks.In the column you want to be fixed, add the "nowrap" option in the TD tag.
For the column to the right, set it's width to 100%.
You could also try putting the contents of the fixed cell in a table of it's
own with a fixed size and aligned either center, left, or right. If the
right
column changes, it won't change how the nested table looks to the user.
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/for...st10017013.aspx
http://www.eggheadcafe.com/articles...e_generator.asp
"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
> ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
>
For the table set css rule table_layout:fixed; then specify the width for
the columns in the first row.
Eliyahu
"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
>
Great ideas! Thanks so much!
"Robbe Morris [C# MVP]" <info@.turnkeytools.com> wrote in message
news:%23x78IcwEFHA.1924@.TK2MSFTNGP14.phx.gbl...
> In the column you want to be fixed, add the "nowrap" option in the TD tag.
> For the column to the right, set it's width to 100%.
> You could also try putting the contents of the fixed cell in a table of
it's
> own with a fixed size and aligned either center, left, or right. If the
> right
> column changes, it won't change how the nested table looks to the user.
> --
> 2005 Microsoft MVP C#
> Robbe Morris
> http://www.robbemorris.com
> http://www.mastervb.net/home/ng/for...st10017013.aspx
> http://www.eggheadcafe.com/articles...e_generator.asp
>
> "Iams" <Iams@.hotmail> wrote in message
> news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
the
height="100%"
id=UcGeneral1
valign=top><uc1:ucDetails
>

Tables and column sizes

What do I have to do to get a column in a table to stay the same size no
matter what is in the other tables?

I've tried setting the width in px, in percentages, and nothing seems to
work; for example, the columns that are colored #cccccc I want to stay the
size of the menu control, which doesn't change.

However, if the column to the right of it, with the ucGeneral and ucDetails
controls, has nothing in it, or something very small, the #cccccc column
spreads out and I don't want it to do that. What's the secret.

<table runat=server bgcolor=white border=0 bordercolor=black height="100%"
width="100%" cellspacing=0 cellpadding=0 ID="Table1">
<tr height="10%" width="100%">
<td colspan=5><uc1:ucHeader id=UcHeader1
runat="server"></uc1:ucHeader></td>
</tr>
<tr valign=top>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
id=UcMenu1 runat="server"></uc1:ucMenu></td>
<td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
<td bgcolor="white" rowspan=3> </td>
</tr>
<tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
<tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
id=UcDetails1 runat="server"></uc1:ucDetails></td>
</tr>
</table
Thanks.In the column you want to be fixed, add the "nowrap" option in the TD tag.
For the column to the right, set it's width to 100%.

You could also try putting the contents of the fixed cell in a table of it's
own with a fixed size and aligned either center, left, or right. If the
right
column changes, it won't change how the nested table looks to the user.

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/for...st10017013.aspx
http://www.eggheadcafe.com/articles...e_generator.asp

"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
> ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
In the column you want to be fixed, add the "nowrap" option in the TD tag.
For the column to the right, set it's width to 100%.

You could also try putting the contents of the fixed cell in a table of it's
own with a fixed size and aligned either center, left, or right. If the
right
column changes, it won't change how the nested table looks to the user.

--
2005 Microsoft MVP C#
Robbe Morris
http://www.robbemorris.com
http://www.mastervb.net/home/ng/for...st10017013.aspx
http://www.eggheadcafe.com/articles...e_generator.asp

"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
> ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
For the table set css rule table_layout:fixed; then specify the width for
the columns in the first row.

Eliyahu

"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
For the table set css rule table_layout:fixed; then specify the width for
the columns in the first row.

Eliyahu

"Iams" <Iams@.hotmail> wrote in message
news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> What do I have to do to get a column in a table to stay the same size no
> matter what is in the other tables?
> I've tried setting the width in px, in percentages, and nothing seems to
> work; for example, the columns that are colored #cccccc I want to stay the
> size of the menu control, which doesn't change.
> However, if the column to the right of it, with the ucGeneral and
ucDetails
> controls, has nothing in it, or something very small, the #cccccc column
> spreads out and I don't want it to do that. What's the secret.
> <table runat=server bgcolor=white border=0 bordercolor=black height="100%"
> width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> <tr height="10%" width="100%">
> <td colspan=5><uc1:ucHeader id=UcHeader1
> runat="server"></uc1:ucHeader></td>
> </tr>
> <tr valign=top>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> id=UcMenu1 runat="server"></uc1:ucMenu></td>
> <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> <td bgcolor="white" rowspan=3> </td>
> </tr>
> <tr valign=top width="100%"><td valign=top><uc1:ucGeneral id=UcGeneral1
> runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> <tr valign=top height="100%" width="100%"><td valign=top><uc1:ucDetails
> id=UcDetails1 runat="server"></uc1:ucDetails></td>
> </tr>
> </table>
>
> Thanks.
Great ideas! Thanks so much!
"Robbe Morris [C# MVP]" <info@.turnkeytools.com> wrote in message
news:%23x78IcwEFHA.1924@.TK2MSFTNGP14.phx.gbl...
> In the column you want to be fixed, add the "nowrap" option in the TD tag.
> For the column to the right, set it's width to 100%.
> You could also try putting the contents of the fixed cell in a table of
it's
> own with a fixed size and aligned either center, left, or right. If the
> right
> column changes, it won't change how the nested table looks to the user.
> --
> 2005 Microsoft MVP C#
> Robbe Morris
> http://www.robbemorris.com
> http://www.mastervb.net/home/ng/for...st10017013.aspx
> http://www.eggheadcafe.com/articles...e_generator.asp
>
> "Iams" <Iams@.hotmail> wrote in message
> news:%23iY$CvuEFHA.2180@.TK2MSFTNGP12.phx.gbl...
> > What do I have to do to get a column in a table to stay the same size no
> > matter what is in the other tables?
> > I've tried setting the width in px, in percentages, and nothing seems to
> > work; for example, the columns that are colored #cccccc I want to stay
the
> > size of the menu control, which doesn't change.
> > However, if the column to the right of it, with the ucGeneral and
> > ucDetails
> > controls, has nothing in it, or something very small, the #cccccc column
> > spreads out and I don't want it to do that. What's the secret.
> > <table runat=server bgcolor=white border=0 bordercolor=black
height="100%"
> > width="100%" cellspacing=0 cellpadding=0 ID="Table1">
> > <tr height="10%" width="100%">
> > <td colspan=5><uc1:ucHeader id=UcHeader1
> > runat="server"></uc1:ucHeader></td>
> > </tr>
> > <tr valign=top>
> > <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> > <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"><uc1:ucMenu
> > id=UcMenu1 runat="server"></uc1:ucMenu></td>
> > <td bgcolor="#cccccc" rowspan=3 style="WIDTH: 10px"> </td>
> > <td bgcolor="white" rowspan=3> </td>
> > </tr>
> > <tr valign=top width="100%"><td valign=top><uc1:ucGeneral
id=UcGeneral1
> > runat="server"></uc1:ucPointOfDiversionGeneral></td></tr>
> > <tr valign=top height="100%" width="100%"><td
valign=top><uc1:ucDetails
> > id=UcDetails1 runat="server"></uc1:ucDetails></td>
> > </tr>
> > </table>
> > Thanks.

Tuesday, March 13, 2012

TASK MENU

I see on some text a task menu pop up next to a dropdownlist or a grid view for choosing a datasource and setting certain properties. I try but fail to make the task menu appear. Please explain how. Thanks.

In design mode, hover over a control that has quicktasks (datasource,dropdown,etc..)
a small triangle appears above the control - click it to open quicktasks