SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Location
    C'Ville, VA
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS + Mozilla / .NET = Confused?

    I'm having a problem getting my CSS code to display consistently across the different browsers. I'm using ASP.NET to dynamically generate a CheckListBox and have been able to manipulate it through CSS to display consistent in IE, but Mozilla/FireFox seems to disregard the styles altogether and I'm sure Netscape will blow up as well. Any help/advice would be greatly appreciated. I will be more than happy to give out the URL to whomever might find it useful or can send screen captures if desired. Thanks.

    Here's the CSS...

    body, div, td, th {
    font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    font-size: 90%;
    text-align: center;
    background-color:#F2F2F2;
    color:#000000;
    }
    div#container
    {
    margin-left: auto;
    margin-right: auto;
    width: 80%;
    text-align: left;
    }
    label,input,#cboState,#cboCountry {
    display: block;
    width: 150px;
    float: left;
    margin-bottom: 10px;
    }
    label {
    text-align: right;
    width: 150px;
    padding-right: 20px;
    font-weight:bold;
    }
    input,select,textarea {
    background-color: #FFF;
    color: #000;
    padding-left:2px;
    }
    /* RESTRICTION CHECKBOXES ... */
    .Restrictions label {
    text-align: left;
    width: 250px;
    padding-right: 20px;
    font-weight:normal;
    text-align:left;
    background-color:#F2F2F2;
    position:relative;
    font-size:90%;
    padding-top:2px;
    }
    .Restrictions input {
    width:15px;
    margin-right:10px;
    background-color:#F2F2F2;
    }

    Here's the simplified code...
    <HTML>
    <HEAD>
    <title></title>
    <style type="text/css" media="screen" title="currentStyle">
    @import url(style-x.css);
    </style>
    </HEAD>
    <body>
    <div id="container">
    <p class="duesRenewalSystem">STC Online Dues Renewal System</p>
    <h3><asp:label id="lblMemberInfo" runat="server">Restriction Information</asp:label></h3>
    <form id="MemberRestrictions" method="post" runat="server">
    <label for="chklstRestrictions">Restrictions</label>
    <span class="Restrictions">
    <asp:CheckBoxList id="chklstRestrictions" runat="server" RepeatColumns="2"></asp:CheckBoxList><br><br>
    </span>
    <div id="MessageInfo">
    <% = Session("MessageToMember") %>
    </div>

    </form>
    </div>
    </body>
    </HTML>
    Cheers,

    Russ

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Show the generated source (View->Source in your browser). The .aspx source doesn't tell us anything about how the content is generated.

  3. #3
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Location
    C'Ville, VA
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    View Source File...

    Sorry about that... here's the "View Source" of the file.

    <HTML>
    <HEAD>
    <title></title>
    <style type="text/css" media="screen" title="currentStyle">
    @import url(style-x.css);
    </style>
    </HEAD>
    <body>
    <div id="container">
    <p class="duesRenewalSystem">STC Online Dues Renewal System</p>
    <h3><asp:label id="lblMemberInfo" runat="server">Restriction Information</asp:label></h3>
    <form id="MemberRestrictions" method="post" runat="server">
    <label for="chklstRestrictions">Restrictions</label>
    <span class="Restrictions">
    <input type="hidden" name="__VIEWSTATE" value="XXX" />

    <label for="chklstRestrictions">Restrictions</label>
    <span class="Restrictions">
    <table id="chklstRestrictions" border="0">
    <tr>
    <td><input id="chklstRestrictions_0" type="checkbox" name="chklstRestrictions:0" checked="checked" /><label for="chklstRestrictions_0">No Mail</label></td><td><input id="chklstRestrictions_5" type="checkbox" name="chklstRestrictions:5" /><label for="chklstRestrictions_5">Exclude E-mail from Mbr Dir</label></td>
    </tr><tr>
    <td><input id="chklstRestrictions_1" type="checkbox" name="chklstRestrictions:1" /><label for="chklstRestrictions_1">Exclude from Mbr Dir</label></td><td><input id="chklstRestrictions_6" type="checkbox" name="chklstRestrictions:6" /><label for="chklstRestrictions_6">No STC Email</label></td>
    </tr><tr>
    <td><input id="chklstRestrictions_2" type="checkbox" name="chklstRestrictions:2" /><label for="chklstRestrictions_2">Exclude Address from Mbr Dir</label></td><td><input id="chklstRestrictions_7" type="checkbox" name="chklstRestrictions:7" /><label for="chklstRestrictions_7">No Intercom</label></td>
    </tr><tr>
    <td><input id="chklstRestrictions_3" type="checkbox" name="chklstRestrictions:3" /><label for="chklstRestrictions_3">Exclude Phone from Mbr Dir</label></td><td><input id="chklstRestrictions_8" type="checkbox" name="chklstRestrictions:8" /><label for="chklstRestrictions_8">No Tech Comm</label></td>
    </tr><tr>
    <td><input id="chklstRestrictions_4" type="checkbox" name="chklstRestrictions:4" /><label for="chklstRestrictions_4">Exclude Fax from Mbr Dir</label></td>
    </tr>
    </table><br><br>
    </span>
    <div id="MessageInfo">
    <% = Session("MessageToMember") %>
    </div>

    <div id="navButtons">
    <input type="submit" name="btnResetForm" value="Reset Page" id="btnResetForm" tabindex="16" />
    <input type="submit" name="btnContinue" value="Continue" id="btnContinue" tabindex="15" />
    </div>

    </form>
    </div>
    </body>
    </HTML>
    Cheers,

    Russ

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,877
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Try clearing the table.
    Code:
    table#chklstRestrictions {clear:both}
    Paul

  5. #5
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by Paul O'B
    Hi,

    Try clearing the table.
    Code:
    table#chklstRestrictions {clear:both}
    Paul
    The problem is that it may be a table in Mozilla, but it may be a div in other browsers (like IE).

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,877
    Mentioned
    160 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by Vinnie
    The problem is that it may be a table in Mozilla, but it may be a div in other browsers (like IE).
    Explain please

  7. #7
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It would be really helpful to me if you provided a URL to the page. ASP.NET and CSS don't agree in Mozilla browser much of the time as I have witnessed. Especially in regards to validation controls, don't even get me started.

    I'm not sure what Vinnie is talking about and would need him to elaborate, because at the moment, I don't agree.
    Ryan Butler

    Midwest Web Design

  8. #8
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by rbutler
    I'm not sure what Vinnie is talking about and would need him to elaborate, because at the moment, I don't agree.
    I was thinking of the way asp:panel is rendered in IE vs. other browsers without modifying some config files. Sorry bout that.

  9. #9
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No problem. I read a discussion the other day b/w Zak and someone else about the lack of support for Panel's without changing the machine file within windows.

    I follow you now. I would still like to see a link to this guy's site, I have to see it to diagnose problems, because I'm not that good yet.
    Ryan Butler

    Midwest Web Design

  10. #10
    SitePoint Enthusiast
    Join Date
    Apr 2001
    Location
    C'Ville, VA
    Posts
    31
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No dice clearing the table. I will contact those interested in viewing the application directly and give them the URL. Unfortunately, I can't share this address to the entire forum as the system is currently live and running with real data (even though it's still in development mode). Thanks for all who have responded.

    Russ
    Cheers,

    Russ

  11. #11
    SitePoint Wizard rbutler's Avatar
    Join Date
    Jul 2003
    Location
    Springfield, MO
    Posts
    1,867
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I replied back via PM, I must not be seeing something because I didn't catch anything different from IE 6 to Firefox PR.
    Ryan Butler

    Midwest Web Design


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •