Solved

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

Posted on 2009-05-14
10
663 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:Steggs
ID: 24391775
Hello,

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

Thanks
0
 
LVL 42

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
 

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:Steggs
ID: 24396687
I notice that the buttons are self closed... could that be something to do with it?
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 

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 42

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 42

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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Get to know the ins and outs of building a web-based ERP system for your enterprise. Development timeline, technology, and costs outlined.
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
The viewer will get a basic understanding of what section 508 compliance can entail, learn about skip navigation links, alt text, transcripts, and font size controls.

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now