styling

Is it possible to style a title? (and with CSS or js?) [duplicate]

断了今生、忘了曾经 提交于 2019-11-27 02:14:11
This question already has an answer here: How to change the style of the title attribute inside an anchor tag? 10 answers I was wondering if it was possible to style a title : <a href="#" title="This is a title">Hello</a> The styling question has two aspects: Text formatting / encoding (Which I guess is possible SO does it in questions*). The Tooltip styling , can you make it bigger? other colors? etc. And the other issue I have is how do you "point" to title ? From CSS From Javascript / jQuery Thanks in advance! *What I ment by text formatting / encoding: You can put newlines in your title

How do you set the style for a JavaFX ContextMenu using css?

落爺英雄遲暮 提交于 2019-11-27 02:12:17
问题 I am trying to change the style of a ContextMenu item using a seperate CSS file. I looked at the caspian.css section and found the following definitions: .context-menu .context-menu .separator .context-menu .scroll-arrow .context-menu .scroll-arrow:hover .context-menu:show-mnemonics .mnemonic-underline I copied those over exactly to my css file and changed just the background color values as a test: .context-menu { -fx-skin: "com.sun.javafx.scene.control.skin.ContextMenuSkin"; -fx-background

WPF, XAML: How to style a ListBoxItem using binding on property of ListBox ItemsSource object?

此生再无相见时 提交于 2019-11-27 01:57:27
问题 I have a ListBox which is bound to ObservableCollection of LogMessages. public ObservableCollection<LogMessage> LogMessages { get; set; } public LogMessageData() { this.LogMessages = new ObservableCollection<LogMessage>(); } Each Message has two parameters: public class LogMessage { public string Msg { get; set; } public int Severity { get; set; } //code cut... } ListBox is getting filled with those Items, and I need to color-code (change a background color of ListBoxItem ) list depending on

CSS Parent/Ancestor Selector [duplicate]

て烟熏妆下的殇ゞ 提交于 2019-11-26 22:58:40
Possible Duplicate: Is there a CSS parent selector? I know this is a shot in the dark, but is there a way, using css only, CSS2, no jquery, no javascript, to select and style an element's ancestor? I've gone through the selectors but am posting this in case I missed something or there is a clever workaround. For example, say I have a table with classname "test" nested inside a div. Is there some sort of: <div> <table class="test"> </table> </div> div (with child) .test { /*styling, for div, not .test ...*/ } There is no such thing as parent selector in CSS2 or CSS3. And there may never be,

Line break (like <br>) using only css

点点圈 提交于 2019-11-26 21:38:28
Is it possible in pure css, that is without adding additional html tags, to make a line break like <br> ? I want the line break after the <h4> element, but not before: HTML <li> Text, text, text, text, text. <h4>Sub header</h4> Text, text, text, text, text. </li> CSS h4 { display: inline; } I have found many questions like this, but always with answers like "use display: block;" , which I can't do, when the <h4> must stay on the same line. adriantoine It works like this: h4 { display:inline; } h4:after { content:"\a"; white-space: pre; } Example: http://jsfiddle.net/Bb2d7/ The trick comes from

Alternative for nth-child for older IE browsers

╄→гoц情女王★ 提交于 2019-11-26 21:24:32
问题 Is there an alternative for targeting elements using nth-child() for older IE browsers? Javascript (non-jquery) would suffice as well. EDIT: Given additional libraries cannot be added to the page. 回答1: You can use jQuery's :nth-child() selector; $("li:nth-child(even)") // target even li's $("li:nth-child(odd)") // target odd li's $("li:nth-child(5n)") // target the fifth li 回答2: it sucks a little, but you can ul > li {} /* first-child, overwritten by below */ ul > li + li {} /* second-child,

Styling autocomplete dropdowns in browsers

泄露秘密 提交于 2019-11-26 18:31:43
问题 On many websites, when typing in a username for example, a dropdown occurs where previous input shows up so the user can easily select something instead of typing. I know you can turn this off in browsers by having the form or input have an attribute of autocomplete="off" . The problem is when I want it on, and the input has padding. The dropdown looks horribly off because it has no padding for each item. Is there any way to style this with only css? I'm aware that you could potentially use a

SVG USE element and :hover style

别等时光非礼了梦想. 提交于 2019-11-26 16:34:32
I'm trying to use CSS :hover pseudoclass to style SVG elements embeded from <defs> by <use> tag, but it doesn't seem to work :-/ Here's my code: <!DOCTYPE HTML> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <meta http-equiv="content-type" content="application/xhtml+xml; charset=utf-8"/> <style type="text/css" media="screen"> .active { fill: #0BE; } .active:hover { opacity: 0.8; stroke: #F0F; stroke-width: 4px; } .active2 #p2 { fill: #0BE; } .active2:hover #p2 { opacity: 0.8; stroke: #F0F; stroke-width: 4px; } #p2:hover { opacity: 0.8; stroke: #F0F; stroke-width: 4px; } <

How to set foreground and background colors on a WPF Menu control?

不羁岁月 提交于 2019-11-26 16:31:29
问题 I've been working in WPF for quite a while, but there's something basic about styling that I just don't get. How can I set the foreground and background colors for a Menu control? I started with this: <Menu IsMainMenu="True" Background="#FF3A3A3A" Foreground="White"> <MenuItem Header="_File"> <MenuItem Header="_Exit"> </MenuItem> </MenuItem> </Menu> The foreground color is apparently inherited by the MenuItem , but the background is not. Next attempt: <Menu IsMainMenu="True" Background="

Making a borderless window with for Qt

ぐ巨炮叔叔 提交于 2019-11-26 16:29:14
问题 I'm new to Qt C++. I downloaded the latest windows version, did some tutorials and its great. I saw some styling options that the Qt framework has and its great, but now I need to build my application that its main windows (form) it designed/skinned with image without the rectangle borders (borderless?). How can I do it with Qt? 回答1: If your looking for some advanced styling in the shape of a widget, maybe this example will help you: Shaped Clock Example Or maybe you're simply looking for