Solved

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

Posted on 2009-05-14
10
679 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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
 

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

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn how to dynamically set the form action using jQuery.

617 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