[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Fill a table cell with a button asp.net

Posted on 2009-12-19
7
Medium Priority
?
847 Views
Last Modified: 2012-05-08
Hello Experts,

I have 3 buttons and  I want to display on a row (see Code Below) and I want the Buttons to fill the cell. What I get is Each cell is 33% of the page but the buttons are small, I would like them to be
back to back.

                  <table width="100%">
                            <tr>
                                <td style="width: 33%">
                                    <asp:Button ID="btnTheWall" runat="server" Text="The Wall" />
                                </td>
                                <td style="width: 33%">
                                    <asp:Button ID="btnCalander" runat="server" Text="The Calander" />
                                </td>
                                <td style="width: 33%">
                                    <asp:Button ID="btnMyProfile" runat="server" Text="My Profile" />
                                </td>
                            </tr>
                        </table>



Thanks

Billy
0
Comment
Question by:nowmbie
  • 4
  • 2
7 Comments
 
LVL 5

Assisted Solution

by:muhammadyasir
muhammadyasir earned 200 total points
ID: 26088120
remove the width.
 <table >
                            <tr>
                                <td >
                                    <asp:Button ID="btnTheWall" runat="server" Text="The Wall" /></td>
                                <td >
                                    <asp:Button ID="btnCalander" runat="server" Text="The Calander" />
                                </td>
                                <td >
                                    <asp:Button ID="btnMyProfile" runat="server" Text="My Profile" />
                                </td>
                            </tr>
                        </table>

Open in new window

0
 

Author Comment

by:nowmbie
ID: 26088131
Oh I was hoping that the 3 buttons would fill the page width.  So they would appear really wide.

thanks
0
 
LVL 5

Expert Comment

by:muhammadyasir
ID: 26088237
please mark the answer as helpful.
thanks
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:nowmbie
ID: 26088281
Do you know a way to fill the cell with the button? So if I have 3 cells for the width of the page, I need to have the buttons fill 3 cells across the page.

Thanks
0
 
LVL 3

Accepted Solution

by:
EugeneLT earned 300 total points
ID: 26089387
Like 3 buttons stacked below each other ?
Something like that:

<table style="width: 100%">
        <tr>
            <td>
                <input type="button" value="Button1" style="width: 100%" />
                <input type="button" value="Button2" style="width: 100%" />
            </td>
        </tr>
    </table>

Open in new window

0
 

Author Comment

by:nowmbie
ID: 26090994
Thanks That helped me along!  With an adustment I gould get them side by side.


     <table style="width: 100%">
         <tr>
             <td style="width: 50%">
                 <input type="button" value="Button1" style="width: 100%" />
             </td>
             <td style="width: 50%">                
                 <input type="button" value="Button2" style="width: 100%" />
             </td>
         </tr>
    </table>
   
0
 

Author Closing Comment

by:nowmbie
ID: 31668135
Thanks for your help!  This place is great.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Suggested Courses
Course of the Month19 days, 3 hours left to enroll

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question