Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    Oct 2005
    Posts
    19
    Member #
    11738
    Hey everyone,

    I'm running into a problem that's driving me up a wall. I'm working on a table (that's being rendered in ASP.NET) and it seems to completely ignore the CSS class I'm setting it to.

    Here's the class:

    body {
    font-size: 74pt;
    color: #000000;
    font-family: Verdana;
    font-weight: bold;
    }

    Here's the rendered output:

    HTML Code:
    <div id="dataDiv" class="body" align="justify">
                                                                                                                
        THis is a test.
        <table class="body" cellspacing="0" cellpadding="0" border="0" id="ctl00_Content_Wizard1" 
                   style="height:221px;border-collapse:collapse;">
    	<tr style="height:100%;">
    
    		<td valign="top">
                            <table border="0" cellpadding="5" cellspacing="0">
                            <tr>
                                <td colspan="3">
                                    <strong>Choose your Device:</strong>
                                </td>
                            </tr>
                            <tr>
    
                                <td colspan="2" rowspan="2">
                                    <input id="ctl00_Content_Wizard1_rbtnV" type="radio" 
                                            name="ctl00$Content$Wizard1$ChooseDevice" value="rbtnV" />
                                    <label for="ctl00_Content_Wizard1_rbtnV">Choose V</label>
                                </td>
                                <td colspan="2" rowspan="2">
                                    <input id="ctl00_Content_Wizard1_rbtnVMax" type="radio" 
                                            name="ctl00$Content$Wizard1$ChooseDevice" value="rbtnVMax" />
                                    <label for="ctl00_Content_Wizard1_rbtnVMax">Choose V Max</label>
                                </td>
                            </tr>...
    The "this is a test" renders correctly (with the insanely huge font size), but the table is completely ignoring it. Any ideas why?

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,693
    Member #
    5580
    Liked
    717 times
    I guess the obvious question is why do you need to use tables?

    But to answer your question, try putting the class reference
    in your <td> instead of in <table>. Since you're using CSS
    properties, that's sort of the point ... laying out your site using
    CSS instead of tables.


    EDIT:

    Or, you could try:

    body, td {
    font-size: 74pt;
    color: #000000;
    font-family: Verdana;
    font-weight: bold;
    }


  4. #3
    Senior Member
    Join Date
    Feb 2005
    Location
    Canada
    Posts
    435
    Member #
    8983
    In most browsers a table has it's own top level style sheet so the body is overridden by the styles placed but the table is it's own speperate unit.
    try declaring them as
    BODY, TABLE
    or like stated above
    BODY, TD
    Thee Pyro Wolf

  5. #4
    Junior Member
    Join Date
    Oct 2005
    Posts
    19
    Member #
    11738
    Thanks for the help everyone. I was able to get it by placing the class declaration in the table itself. (I had to use tables because that's how asp.net was rendering its wizard controls.)

    :classic:


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 12:30 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com