Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 695
  • Last Modified:

CSS ... Inline Styles ... Command buttons are not obeying the CSS

I'm having a problem with inline styles for command buttons ... they are not taking affect.  All of the other controls on the form (labels, textboxes, drop down lists, etc are obeying the style directives) ... not the command buttons though.  This was actually the last step in my problem solution process.  I started out with an external style sheet and only about 10% of the controls obeyed the external style sheet.  Then I added the styles to the content of the header (eliminating the potential problem of not being able to find the external SS).  Finally I ended up here, where it is impossible for the css to be lost.  Still, the command buttons are hanging out in the middle of nowhere.

Any help would be greatly appreciated.

Regards,
Thomas
<%@ Page Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="RulesCreateNew.aspx.cs" Inherits="SparqWareWeb.RulesCreateNew" Title="Untitled Page" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <telerik:RadTreeView ID="RadTreeView1" runat="server">
 
    </telerik:RadTreeView>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
        <div style="position:relative; height: 45px;	background-color: transparent; 	background-repeat: repeat-x;background-image: url('Styles/Images/RuleMaintenanceFill.gif')">
           <div style="position:relative; background-color: transparent; background-repeat: no-repeat;width: 196px;height: 45px;background-image: url('Styles/Images/RuleMaintenance.gif')"></div>
        </div>
        <div style="background-color: #E1EDFF;">
            <span style="font-family:Arial; font-size: 12px; margin : 0 0 0 25px;">Build a rule or set of rules that a subscriber must meet to be in this group</span>
        </div>
        <div style="height: 15px;	background-color: transparent; background-repeat: repeat-x; background-image: url('Styles/Images/HeaderBottomFade.gif'); border-bottom: solid 1px #CECACA;"></div>
        
        <div style="position: relative; width: 471px; height: 40px; top: 0px; left: 76px;">
            <SFWeb:Label        ID="lblLookFor" runat="server" Text="Look for:" style="position: absolute; left: 20px;  top: 18px; font-family: Arial; font-size: 12px;"></SFWeb:Label>
            <SFWeb:TextBox      ID="txtLookFor" runat="server"                  style="position: absolute; left: 75px;  top: 14px; width: 172px;">Subscribers</SFWeb:TextBox>
            <SFWeb:Label        ID="lblIn"      runat="server" Text="In:"       style="position: absolute; left: 263px; top: 17px; width: 13px; height: 15px; font-family: Arial; font-size: 12px"></SFWeb:Label>
            <SFWeb:DropDownList ID="ddlIn"      runat="server"                  style="position: absolute; left: 285px;	top: 14px; width: 150px;"></SFWeb:DropDownList>
        </div>
        <div style="position: relative; height: 183px; width: 550px;">
            <SFWeb:Label        ID="lblFindSubscribers" runat="server" Text="Find subscribers that match these criteria:" style="position: absolute; top: 20px;	width: 300px; left: 55px; font-family: Arial; font-size: 12px;"></SFWeb:Label>
            <SFWeb:TextBox      ID="txtCriteria" runat="server" TextMode="MultiLine" style="position: absolute;width: 450px;height: 90px;left: 55px;top: 42px;"></SFWeb:TextBox>
            <SFWeb:DropDownList ID="ddlOperator" runat="server"                      style="position: absolute; left: 54px; top: 144px; width: 50px;"></SFWeb:DropDownList> 
        </div>
        <div style="position: relative; width: 550px; height: 148px;">
            <SFWeb:Label        ID="lblDefineMoreCritera" runat="server" Text="Define more criteria:" style="font-family:Arial; font-size: 12px; position: absolute; left: 55px; top:14px;"></SFWeb:Label>
            <SFWeb:DropDownList ID="ddlField" runat="server" BindingDirection="None" style="position: absolute;	left: 54px; top: 35px; 	width: 140px;" 
                                onselectedindexchanged="ddlField_SelectedIndexChanged" 
                                AutoPostBack="True"></SFWeb:DropDownList>
            <SFWeb:TextBox      ID="txtField"     runat="server"                     style="position: absolute; top: 62px; left: 54px;   width: 134px;"></SFWeb:TextBox >
            <SFWeb:Label        ID="lblCondition" runat="server" Text="Condition:"   style="font-family: Arial; font-size: 12px; position: absolute; left: 207px; top: 42px;"></SFWeb:Label>
            <SFWeb:DropDownList ID="ddlCondition" runat="server"                     style="position: absolute; top: 62px; left: 207px;  width: 155px;"></SFWeb:DropDownList>
            <SFWeb:Label        ID="lblWords"     runat="server" Text="Word(s):"     style="font-family: Arial; font-size: 12px; position: absolute; top: 43px; left: 370px;"></SFWeb:Label>
            <SFWeb:TextBox      ID="txtWords"     runat="server"                     style="position: absolute; top: 62px;  left: 370px; width: 138px;"></SFWeb:TextBox>
            <SFWeb:Button       ID="cmdAddToList" runat="server" Text="Add to List"  style="position: absolute;	top: 100px; left: 410px; width: 100px;" onclick="cmdAddToList_Click" />
        </div>
        <div style="	position: relative; width: 550px; height: 64px;">
            <SFWeb:Label   ID="lblRuleName" runat="server" Text="Rule Name:" style="position: absolute; font-family: Arial; font-size: 12;  top: 20px; left: 54px;"></SFWeb:Label>
            <SFWeb:TextBox ID="txtRuleName" runat="server"                   style="position: absolute; top: 18px; left: 132px; width: 280px;"></SFWeb:TextBox>
            <SFWeb:Button  ID="cmdSaveRule" runat="server" Text="Save"       style="position: absolute; top: 15px; left: 427px; width: 85px;"/>
        </div>
</asp:Content>

Open in new window

0
Raptor911
Asked:
Raptor911
  • 5
  • 3
  • 2
1 Solution
 
Mark StegglesWeb DeveloperCommented:
Hello,

Have you checked your page in the validator? validator.w3.org

Thanks
0
 
David S.Commented:
What does the source look like when you view it in the browser?
0
 
Raptor911Author Commented:
Hello Steggs:

Thanks for responding, the answer to your question is no, it does not validate, but the only reason it does not validate is because it doesn't recognize the tags for the custom controls that I am using, SFWeb:button and so forth.

Thomas
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
Raptor911Author Commented:
Kravimir,

Attached is a file that illustrates the problem with the command buttons.

Thanks for responding.

Thomas.
RuleMaintenance.png
0
 
Mark StegglesWeb DeveloperCommented:
I notice that the buttons are self closed... could that be something to do with it?
0
 
Raptor911Author Commented:
Steggs:

Thanks ... that was a good thought ... I closed the buttons using </SFWeb:Button> but it still had no affect on the outcome ... I even refreshed the browser too ... :-(

Thomas
0
 
David S.Commented:
Sorry. That's not quite what I meant.  I meant what does the code look like when you right click on the page and select "view source"?
0
 
Raptor911Author Commented:
Sorry to take this long to get back with you but this is how the two buttons resolve in code ... note the inline style information.

Thanks for taking a look at this.

Raptor911
            <span id="ctl00_ContentPlaceHolder2_lblWords" style="font-family: Arial; font-size: 12px; position: absolute; top: 43px; left: 370px;">Word(s):</span>
            <input name="ctl00$ContentPlaceHolder2$txtWords" type="text" id="ctl00_ContentPlaceHolder2_txtWords" style="position: absolute; top: 62px;  left: 370px; width: 138px;" />
            <input type="submit" name="ctl00$ContentPlaceHolder2$cmdAddToList2" value="Add to List" id="ctl00_ContentPlaceHolder2_cmdAddToList2" style="position: absolute;	top: 100px; left: 410px; width: 100px;" />
        </div>
        <div style="	position: relative; width: 550px; height: 64px;">
            <span id="ctl00_ContentPlaceHolder2_lblRuleName" style="position: absolute; font-family: Arial; font-size: 12;  top: 20px; left: 54px;">Rule Name:</span>
            <input name="ctl00$ContentPlaceHolder2$txtRuleName" type="text" id="ctl00_ContentPlaceHolder2_txtRuleName" style="position: absolute; top: 18px; left: 132px; width: 280px;" />
            <input type="submit" name="ctl00$ContentPlaceHolder2$cmdSaveRule2" value="Save" id="ctl00_ContentPlaceHolder2_cmdSaveRule2" style="position: absolute; top: 15px; left: 427px; width: 85px;" />
 
        </div>
    

Open in new window

0
 
Raptor911Author Commented:
No solution found ... closing question.
0
 
David S.Commented:
Would you still like help with this?

The code you posted doesn't seem to exhibit the problem that is shown in the screenshot you posted.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now