styles

Internal Stylesheet NOT overriding External stylesheet?

我的未来我决定 提交于 2020-01-05 05:47:09
问题 I'm trying to add some custom styles to a few tags but finding it difficult to override the external CSS file. Adding styles inline seems to work fine, but using an internal page stylesheet is not working out. Tags are still using external styles. For example, this is not working <link rel="stylesheet" type="text/css" href="styles.css" /> <style type="text/css"> h1 { font-size:36px; } </style> I even tried creating a custom style <style type="text/css"> h1.heading { font-size:36px; } </style>

IE and Transparent Backgrounds

狂风中的少年 提交于 2020-01-05 03:34:19
问题 I have the following css: body { background-image: url(images/background.jpg); background-repeat: repeat-x; background-color: #99ccff; } Unfortunately, any div created on this page, now automatically has this colour. None of the following works if applied to any divs on he page (it still takes on the above colour. bacgkround: none; background: transparent; bacgkround-color: none; background-color: transparent; Anybody know how to get around this (in IE)? i.e. How do I make the div transparent

How to programmatically create/initialise a Button with a custom style?

試著忘記壹切 提交于 2020-01-04 09:08:09
问题 I am trying to programmatically create some Buttons to add them to an existing ViewGroup. This works fine, but I am not able to init the buttons with the right style. I am aware, that it is not possible to set/change the style of view once it has been created. But all solutions I found so far say, that it should be no problem to create a view with a custom style (from a API level 11 up I think and I am using 14+): Button button = new Button (getActivity(), null, R.style.MyButtonStyle); The

Position absolute not working inside position fixed

六月ゝ 毕业季﹏ 提交于 2020-01-04 07:47:50
问题 <div id="main" style="position: fixed"> <div id="inner" style="position: absolute"> </div> </div> Both main and inner containers taking position: fixed . How to make inner container with position:absolute and main container with position:fixed ? 回答1: You need to define top , right , bottom or left properties when using fixed , relative or absolute positioning on an element. #main { background: #000; position: fixed; height: 300px; width: 200px; left: 20px; top: 10px; } #inner { background:

weird behavior when applying theme to dialog under api 21 [duplicate]

陌路散爱 提交于 2020-01-04 06:55:26
问题 This question already has answers here : Android Alert Dialog with extra background (5 answers) Closed 3 years ago . I am using the theme "Theme.AppCompat.Light.NoActionBar" in my app . I want to make some of my dialogs applying the dark AppCompat theme. So,i created style for the dialog <style name="MyDialogStyle" parent="Theme.AppCompat.Dialog"> </style> (same issue when the parent is "Theme.AppCompat.Dialog.Alert") one in xml file without version constrain and the same style in xml file

How to change window style/theme in c++

丶灬走出姿态 提交于 2020-01-04 05:57:28
问题 I need an approach how to customize the window style like Steam or Spotify. I don't want to have the boring Windows (or any other OS) look. Can that be done with Qt or the WinApi? Do I need DirectX or OpenGL for doing that? Best Regards 回答1: Yes, you can do it with the WinAPI. The primary message you care about is WM_NCPAINT . That's what's sent when the non-client areas of a window (e.g., the frame and title bar) need to be painted. Note that by default, rendering of the non-client areas is

How to change window style/theme in c++

佐手、 提交于 2020-01-04 05:57:14
问题 I need an approach how to customize the window style like Steam or Spotify. I don't want to have the boring Windows (or any other OS) look. Can that be done with Qt or the WinApi? Do I need DirectX or OpenGL for doing that? Best Regards 回答1: Yes, you can do it with the WinAPI. The primary message you care about is WM_NCPAINT . That's what's sent when the non-client areas of a window (e.g., the frame and title bar) need to be painted. Note that by default, rendering of the non-client areas is

Selectable TextBlock or a TextBox with formatted text in WPF

独自空忆成欢 提交于 2020-01-04 05:52:47
问题 I have a situation where I need to show a formatted text (normal, bold, highlighted) and should also be selectable so that user can copy the text. I have used textblock where i can apply multiple formattings using Inline content flow elements but unfortunately it's text is not selectable. Whereas Textbox allows to select text and copy to clipboard, it does not allow me to format text. Is there anything I am missing or I'll have to build a custom control? 回答1: I'm not sure how much style you

Qt QSS Tutorials

杀马特。学长 韩版系。学妹 提交于 2020-01-04 04:37:08
问题 Are there any good Qt QSS tutorials or is there some place where I can see examples of styling widgets? I'd like some complete reference if is there available somewhere. I couldn't find anything but small tutorials on how to style a button or some tabs. Thanks! 回答1: Qt Style Sheets Topics: Overview The Style Sheet Syntax Qt Designer Integration Customizing Qt Widgets Using Style Sheets Qt Style Sheets Reference Qt Style Sheets Examples 来源: https://stackoverflow.com/questions/11165177/qt-qss

Allowing certain scripts to set inline styles

感情迁移 提交于 2020-01-04 04:00:05
问题 I'm securing my page using a csp headers. I set both X-Content-Security-Policy and X-Webkit-CSP . to the following value: default-src 'self'; object-src 'none'; frame-src 'self' *.youtube.com; style-src 'self' https://ajax.googleapis.com; script-src 'self' https://ajax.googleapis.com; report-uri /csp_report Everything loads fine, but I get tHe following error in chrome. I have yet to test it in other browsers. Refused to apply inline style because it violates the following Content Security