styling

CSS styling of form tags

。_饼干妹妹 提交于 2019-12-05 18:48:23
问题 As far as I am aware, a <form></form> tag is supposed to be invisible as part of a webpage, and that when designing a form, one should use div tags (or equivalent) to represent the physical form structure. Is it acceptable (according to W3C standards) to apply CSS to a <form></form> tag? and can anyone point me in the right direction for literature on this issue? 回答1: As far as I am aware, a <form></form> tag is supposed to be invisible as part of a webpage It is supposed to represent a form.

How to make a DIV element responsive

十年热恋 提交于 2019-12-05 13:10:18
So on my small website I have a div that I styled with CSS and as I was testing with various resolutions, the box looked distorted on a small 11 inch screen compared to my 27 inch screen. How can I make my 700 pixel heigth 200 pixel width div look the same size on all monitor sizes Thanks HERE IS THE CSS FOR THE DIV: text-align:center; border:3px solid black; padding-bottom:10px; height:700px; width:200px; background-color: white; margin-right: 2cm; margin-top: -19cm; margin-left: auto; BIW You'll need to add a meta tag to identify the width and media queries to perform an action when the

How do I apply a dynamic style in code at runtime?

时光总嘲笑我的痴心妄想 提交于 2019-12-05 10:57:34
I need to apply a style in code ike this: TextBlock.Style = TryFindResource("MyStyle") as Style; that will be updated dynamically when the resource dictionary is changed (i.e. skin is replaced at runtime). In other words I need the equivalent to using a dynamic resource like this: <TextBlock Style="{DynamicResource MyStyle}" /> Try using SetResourceReference . textBlock.SetResourceReference(TextBlock.StyleProperty, "MyStyle") 来源: https://stackoverflow.com/questions/341629/how-do-i-apply-a-dynamic-style-in-code-at-runtime

Is it somehow possible to style an iframes before/after pseudo-element?

百般思念 提交于 2019-12-05 10:46:27
问题 As the title says, is there a way to style an iframes pseudo before / after ? Without wrapping the iframe with another div , or else?` I tried to style it like any other element, but no success: iframe::before { content: 'foo'; position: absolute; top: 0; left: 0; } iframe::after { content: 'bar'; position: absolute; top: 0; right: 0; } http://fiddle.jshell.net/ppRqm/ Update A known workaround is to add the before/after to an element in the source file: http://fiddle.jshell.net/ppRqm/2/ But

Is there a simple way to add a border to Kivy Labels, Buttons, Widgets etc. with-out images?

跟風遠走 提交于 2019-12-05 09:46:53
I'm trying to add a border to Kivy Buttons but it doesn't work as expected. For labels my implementation seems to be OK but for buttons it overrides/clears the standard look of the button. How can I draw the border above the button with-out changing normal behavior? I'd like to implement it like the ButtonBehavior so I can add a border to every Kivy object with a canvas. I've called it BorderBehavior. Styling dashed, dotted works only for line width of 1 because there is a bug in Kivy (see https://github.com/kivy/kivy/issues/2037 ) (Need to figure out what's wrong here later.) I know that

Change text color for QML controls

↘锁芯ラ 提交于 2019-12-05 05:46:25
I am using some QML controls like GroupBox and CheckBox which have text associated with them. The default color of the text is black. However, I have these items on a dark background and would prefer using white for the text color. These items don't have a color property so I'm not sure what to do. CheckBox { text: "Check Me" } koopajah You need to use the style property to redefine the Component to use for the label based on the CheckBoxStyle import QtQuick 2.1 import QtQuick.Controls 1.0 import QtQuick.Controls.Styles 1.0 Rectangle { color: "black" CheckBox { style: CheckBoxStyle { label:

Too many attribute references warning. Possible causes?

﹥>﹥吖頭↗ 提交于 2019-12-05 03:02:47
I developed an aplication and noticed that i get a lot of " Too many attribute references" warnings in logcat. W/ResourceType﹕ Too many attribute references, stopped at: 0x######## I use support.v7.23.1.0 also design library. I define my styles like this: <style name="AppTheme.Description.TextView" parent="@android:style/Widget.TextView"> <item name="android:textColor">@color/textColorSecondary</item> <item name="android:textColorPrimary">@color/textColorSecondary</item> <item name="android:textSize">@dimen/textSizeItemDescription</item> </style> Application theme: <!-- Base application theme.

loading a local GeoJSON file and using it with the Google Maps Javascript API v3 data layer

时光毁灭记忆、已成空白 提交于 2019-12-05 00:33:26
问题 I have created a JSON FeatureCollection that works in the DataLayer: Drag and Drop tutorial. It is just a collection of 2 roads so far, but I cannot figure out how to get the JSON file to load. It is a local file for now, so I thought calling it up and styling it ala tutorial would put me on the right path. But it isn't working. Here are the HTML and the JSON files. <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <title>FMRE Main Map</title

WPF Listbox - Empty List Display Message

三世轮回 提交于 2019-12-04 22:57:03
Can anyone suggest the best way to display a Textblock (with a text such as "List Empty") so that it's visibility is bound to the Items.Count. I have tried the following code and can't get it to work, so think that I must be doing it wrong. <ListBox x:Name="lstItems" ItemsSource="{Binding ListItems}"> </ListBox> <TextBlock Margin="4" FontStyle="Italic" FontSize="12" Text="List is empty" Visibility="Collapsed"> <TextBlock.Style> <Style TargetType="{x:Type TextBlock}"> <Style.Triggers> <DataTrigger Binding="{Binding ElementName=lstItems, Path=Items.Count}" Value="0"> <Setter Property="Visibility

Styling Ribbon from the RibbonControlsLibrary

时光毁灭记忆、已成空白 提交于 2019-12-04 20:40:27
Ribbon is nice. I want to make it nicer... (IMHO) With the Ribbon (from RibbonControlsLibrary on .NET 3.5 sp1), it is ok to change some backgrounds and foregrounds. But the thing I want to re-style is the white "mask" (linear gradient brush with alpha) that seats in the "background" of the RibbonTabGroup. I saw it with Snoop. I found it in the style. <LinearGradientBrush x:Key="[49] Í" StartPoint="0.5,0.0" EndPoint="0.5,1.0"> <GradientStop Color="#EEFFFFFF" Offset="0.0" /> <GradientStop Color="#BBFFFFFF" Offset="0.1" /> <GradientStop Color="#05FFFFFF" Offset="0.5" /> <GradientStop Color="