?
Solved

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

Posted on 2009-05-14
10
Medium Priority
?
695 Views
Last Modified: 2012-05-07
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
Comment
Question by:Raptor911
  • 5
  • 3
  • 2
10 Comments
 
LVL 30

Expert Comment

by:Mark Steggles
ID: 24391775
Hello,

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

Thanks
0
 
LVL 43

Expert Comment

by:David S.
ID: 24392442
What does the source look like when you view it in the browser?
0
 

Author Comment

by:Raptor911
ID: 24396464
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 

Author Comment

by:Raptor911
ID: 24396568
Kravimir,

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

Thanks for responding.

Thomas.
RuleMaintenance.png
0
 
LVL 30

Expert Comment

by:Mark Steggles
ID: 24396687
I notice that the buttons are self closed... could that be something to do with it?
0
 

Author Comment

by:Raptor911
ID: 24396822
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
 
LVL 43

Expert Comment

by:David S.
ID: 24399315
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
 

Author Comment

by:Raptor911
ID: 24466672
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
 

Accepted Solution

by:
Raptor911 earned 0 total points
ID: 24494914
No solution found ... closing question.
0
 
LVL 43

Expert Comment

by:David S.
ID: 24500100
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

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
Suggested Courses
Course of the Month4 days, 21 hours left to enroll

601 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