styling

Alternative for nth-child for older IE browsers

自闭症网瘾萝莉.ら 提交于 2019-11-27 23:19:15
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. 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 it sucks a little, but you can ul > li {} /* first-child, overwritten by below */ ul > li + li {} /* second-child, overwritten by below, etc */ ul > li + li + li {} ul > li + li + li + li {} Repeat as necessary. There is

Styling a GroupBox

纵饮孤独 提交于 2019-11-27 19:11:34
I'm trying to create a GroupBox design like this. I have looked at the GroupBox.HeaderTemplate but I'm having problems creating the blue background color, with a width of 100%. The same goes for the border. My code so far <GroupBox.HeaderTemplate> <DataTemplate> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> </Grid.ColumnDefinitions> <Label Content="{Binding}" HorizontalAlignment="Stretch" Background="#25A0DA" Grid.Column="0" Height="20" Padding="5,0,0,0" Margin="1" Foreground="White"/> </Grid> </DataTemplate> </GroupBox.HeaderTemplate> And this is what it looks like right now.

Set a padding on dataGridCells in WPF

≡放荡痞女 提交于 2019-11-27 18:40:37
simple question: How can I set a padding on a dataGridCell in WPF? (either one at a time or on all cells, I don't care) I have tried using the DataGrid.CellStyle property by adding a setter on the DataGridCell.Padding property as well as using the DataGridColumn.CellStyle property in the same way with no effect. I also tried using the DataGridColumn.ElementStyle property with no more luck. I'm kind of stuck there, has anyone managed to get a padding applied on a dataGridCell? NB: I'll add that no, I cannot use transparent borders to do this, since I already use the border properties for

Styling autocomplete dropdowns in browsers

蹲街弑〆低调 提交于 2019-11-27 16:04:40
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 javascript/jQuery workaround to store previous entries in a cookie or something and make your own

Making a borderless window with for Qt

喜你入骨 提交于 2019-11-27 14:04:00
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? Andy M 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 this kind of flag: Qt::CustomizeWindowHint or simply Qt::FramelessWindowHint . Fernando Lopez Jr. There

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

雨燕双飞 提交于 2019-11-27 13:45:46
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="#FF3A3A3A" Foreground="White"> <MenuItem Background="#FF3A3A3A" Header="_File"> <MenuItem Header="_Exit"> <

WPF DataGrid style-Silverlight DataGrid?

自闭症网瘾萝莉.ら 提交于 2019-11-27 13:39:53
问题 That's not a secret: Silverlight's DataGrid default style is beautiful while WPF's is poor. Instead of reinventing the wheel let me ask the community if anyone has copied the SL styles to use in WPF. Please take a look at the screenshots and judge for yourself how the Silverlight and WPF teams invest in their products. Silverlight default-style DataGrid: WPF default-style DataGrid (updated after Saied K's answer): 回答1: I haven't found any projects with a working Silverlight-style DataGrid ,

How are scrollbars in new Google Docs UI styled (esp. the arrow buttons)?

我与影子孤独终老i 提交于 2019-11-27 12:15:03
问题 The new Google Docs UI features cool gray scrollbars. These appear to be regular scrollbars styled with selectors like ::-webkit-scrollbar-thumb . Which is nice and accessible. However, I can't get arrow buttons to appear (circled on the screenshot). Inspector shows no corresponding DOM elements or any special CSS. So the question is, how these custom scrollbars are made, including the arrow buttons? Please check out this fiddle. Edit: So it seems that just not all css rules appear in the

height vs line-height styling

喜夏-厌秋 提交于 2019-11-27 11:33:19
问题 What is the difference between using these two when dealing with text that will never be more than a single line? They both can produce similar results on the screen from what I can see in regards to the elements on top or on the bottom of the element. Why use line-height at all if so? Height would make more sense to use. Edit: An example of this a stylized button created from a div with text inside. This will never be multiline. So would line-height be needed for compatibility reasons? or

How to explore styling in android

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 11:21:24
问题 I'm trying to theme my app in Android. However, each widget is an excrutiating pain in itself: I have to search for theming that particular widget and then create a style that hopefully derives from same style that widget uses. Of course, answers about theming a particular widget don't always contain info about base style, just the particular colors. So, instead of accepting fish to eat, can you teach me to fish instead? How do I interpret those ObtainStyledAttributes() calls in widget