Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

DialogBox Title colour chaange and Background colour change

Dear All,

I am using the CSS to create the XML view page Header, I have used the below CSS code for changeing the colour in the Custom header.

.sap-desktop .sapMIBar.sapMHeader-CTX {

  background-color: #B41601;

  text-color : #ffffff

/* background-image: url(../img/headerBgImg5.png) */

}

.sap-desktop1 .sapMIBar.sapMHeader-CTX {

  background-color: #B41601;

    text-color : #ffffff

/* background-image: url(../img/headerBgImg5.png) */

}

I am calling the another XML fragment as a Dialog Box in side the Mainview after clicking the Button. Its working fine but same colour of Custom header was displaying in the Dialog Box as well in the Title Bar.  But my requirement is to display the Standard Title Bar colour or different Colour.

<Dialog

  title="My Dialog" >

  <Toolbar >  

   

   

      </Toolbar>

Main view header Code

<Page

    title="Page"

    class="sapUiContentPadding" >

    <customHeader>

 

      <Toolbar >  

</Toolbar>

Here is the Output below if the Title of XML Fragment and Header also displaying the Same colour.

Attached the same.

<div xmlns="http://www.w3.org/1999/xhtml" width="100%">

  <div xmlns="http://www.w3.org/1999/xhtml" style="float: left;padding-top:30px;"><image src="img\logo-full.png" id="__image1"/></div>

</Toolbar>

Need your help to change the Background colour and Text Colour to be displayed. Can we change the Colour of Title text along with the Backgrounc Colour.

Thanks in advance.

Dialog.JPG (23268 B)
Tags:
replied

I once had exactly the same requirement

You can specify the dialog header background by adding sapMDialogTitle to the cascade:

.sap-desktop .sapMIBar.sapMHeader-CTX.sapMDialogTitle {

    background-color: #fff;

}

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question