Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7806835
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:39:36+00:00 2026-06-02T02:39:36+00:00

Simple CSS: table.tgi { width:100%; } table.tgi td.labelcell { text-align:right; color:Red; } table.tgi td.valuecell

  • 0

Simple CSS:

table.tgi
{
    width:100%;
}

table.tgi td.labelcell
{
    text-align:right;
    color:Red;
}

table.tgi td.valuecell
{
    text-align:left;
    color:Green;
}

Simple HTML:

<table id="tgi" runat="server" width="100%">
            <tbody>
            <tr>
                <td class="labelcell">ID:</td>
                <td></td>
                <td class="labelcell">Originator:
                </td>
                <td class="valuecell"><asp:Button ID="Button1" runat="server" Text="Button" /></td>
            </tr>
            <tr>
                <td class="labelcell">Expected Ship Date:</td>
                <td class="valuecell"><asp:TextBox ID="txtExpectedShipDate" runat="server"></asp:TextBox></td>
                <td class="labelcell">Actual Ship Date:</td>
                <td class="valuecell"><asp:TextBox ID="txtActualShipDate" runat="server"></asp:TextBox></td>
            </tr>
            </tbody>
        </table>

But the TD styling does not work…

Edit

I tried this:

table#tgi
{
    width:100%;
}

table#tgi td.labelcell
{
    text-align:right;
    color:Red;
}

table#tgi td.valuecell
{
    text-align:left;
    color:Green;
}

With HTML:

 <table id="tgi" runat="server">
            <tbody>
            <tr>
                <td class="labelcell">ID:</td>
                <td class="valuecell"></td>
                <td class="labelcell">Originator:</td>
                <td class="valuecell"><asp:Button ID="Button1" runat="server" Text="Button" /></td>
            </tr>
            <tr>
                <td class="labelcell">Expected Ship Date:</td>
                <td class="valuecell"><asp:TextBox ID="txtExpectedShipDate" runat="server"></asp:TextBox></td>
                <td class="labelcell">Actual Ship Date:</td>
                <td class="valuecell"><asp:TextBox ID="txtActualShipDate" runat="server"></asp:TextBox></td>
            </tr>
            </tbody>
        </table>

This doesnt work…
but if I change it to a class it works…but I want to try it with an ID???

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:39:37+00:00Added an answer on June 2, 2026 at 2:39 am

    Your table has an ID if tgi, not a class.

    Fix #1

    <table class="tgi" runat="server" width="100%">
    

    Fix #2

    table#tgi
    {
        width:100%;
    }
    
    table#tgi td.labelcell
    {
        text-align:right;
        color:Red;
    }
    
    table#tgi td.valuecell
    {
        text-align:left;
        color:Green;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Simple example: $(document).ready(function(){ $('body').css({'background-color': '#dddddd', 'font-size': '12pt'}); $('table tr:odd').addClass('rowShaded'); $('<p> Oh my learning jQuery
I'm using simple html table with following css which will simply change background color
I am working on existing project. I created a simple table. <table border='0' width='100%'>
I have an anchor tag with some simple CSS: div { background-color: gray; /*
I have HTML + CSS text. I need some lib with simple function like
Good day, I've got a simple CSS question. I'm trying to change a table
I made a site with simple instructions let's say: <html> <head> <style type=text/css> .a120
I'm creating a simple hierarchical table with html and CSS and I'm getting into
So, working on a simple website (XHTML and CSS) formatted using a table, I
I have a simple form method... <form method=POST action=j_security_check> <table> <tr> <td>Name:</td> <td><input type=text

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.