setting a simple style-sheet for a dbedit not working

<< Click to Display Table of Contents >>

Navigation:  Forum >

setting a simple style-sheet for a dbedit not working

Forum link

 

 

 


 

11-19-2024, 08:47 AM:

 

Hello all,

 

I try to apply a simple style-sheet to an IWDbEdit-component. This is only a test of how to use stylesheets and will be expanded later with more useful style changes. I do it like this:set the css-property of the IWDbEdit to "IWMYDBEDIT"

 

 

 

set the stylesheet.filename-property of the form to "mystylesheet.css" --> this seems to work, see code-snippet

 

 

 

place mystylesheet.css into wwwroot-folder

 

 

 

content of MyStyleSheet.css is only one line:

 

IWMYDBEDIT { font-size: 30px; }

 

 

 

 

 

Running the application, the font-size isn't changed. Looking at the source-code for the web-page shows me this. The link seems to be correct, but the compnent gets a default-style #IWDBEDIT1 instead of the expected MYDBEDIT-style:

 

Code:

 

...

 

<link rel="stylesheet" href="/mystylesheet.css" nonce="CbJRCUdc/AO61BxCnTlOqe6BwII">

 

...

 

<style data-type="iw" nonce="CbJRCUdc/AO61BxCnTlOqe6BwII">

 

#IWDBEDIT1{position: absolute; left: 144px; top: 16px;z-index: 100; width: 289px; height: 43px; padding: 0; font-weight: bold; font-style: normal; font-size: 13px; text-decoration: none;overflow: hidden;}

 

...

 

 

 

What am I doing wrong?

 

I tried several combinations of css-property and naming the style in the css-file like IWMYDBEDIT, .IWMYDBEDIT,...

 

It seems that Intraweb can't find my style and replaces it with the default-style using #IWDBEDIT1{...}. The css-file is referenced in <link rel="stylesheet". The file is placed in wwwroot so I think this part is OK. So I am sure to make any mistake in naming the style, but can't figure out what I am doing wrong.

 

Can anyone give me an advice?

 

Many thank for your help

 

Siegbert

 

 

 


 

12-07-2024, 03:36 PM:

 

Hello Siegbert

 

sorry ... I can't give you any advice, I found your Post cause I have the same problem with TIWLabel.

 

I test with:

 

.label2 {

 

  color: green;

 

  HighlightColor:blue;

 

  text-align: center;

 

  font-size: 64px;

 

}

 

or simply without dot

 

label3 {   

 

  color: blue;

 

  HighlightColor:black;

 

  font-family: Arial, Helvetica, sans-serif;

 

  text-align: left;

 

  font-size: 64px;

 

}

 

text-align seems to work, 

 

color works . I can switch between red blue or what else

 

The size is seems to be ignored.

 

Your Post is from november  sad

 

So the support here is once again not so great.

 

Maybe you find a solution. So it will be helpfull if you post it here. On the other hand , I'm looking for this topic in "stackoverflow.com" If I will find something I post a reply

 

 

 


 

12-10-2024, 10:25 PM:

 

Have you turned off the inline styles through IWDbEdit.StyleRenderOptions

 

 

 


 

12-16-2024, 03:39 PM:

 

Disabling RenderFont as joelcc suggests seems to make it work:

 

clip0025