styling

Do CSS rules exist for placing content within elements and positioning them?

烈酒焚心 提交于 2019-12-11 17:50:04
问题 Do CSS rules exist for placing content such as images or text within elements? eg. say I have a div which can contain some info which is correct and some info which is wrong, can I have rules such as: .correct { img: greenTick.jpg; text: "answer is wrong" } .wrong { img: redX.jpg; text: "answer is correct" } Is it possible to position them too? 回答1: You can use pseudo elements (::before and ::after). Set the text using the content attribute, and the image as the background of the pseudo

change links in tabular inlines not displayed after django-baton installed

给你一囗甜甜゛ 提交于 2019-12-11 16:29:25
问题 Change links, normally appear in each row in tabular inlines, not displayed after django-baton installed. django 1.11 python 3.4 django_baton 1.1 show_change_link is correctly set. 回答1: I was able to reproduce the bug, I've filed it on github issues page (https://github.com/otto-torino/django-baton/issues/5) and fixed it in the new baton release. Please upgrade django-baton to release 1.1.1. 来源: https://stackoverflow.com/questions/49929257/change-links-in-tabular-inlines-not-displayed-after

Get style at caret position in a JTextPane

会有一股神秘感。 提交于 2019-12-11 14:00:06
问题 I have a basic text editor that can style documents (bold, underline, italicize, underline, align left/right/center, color, font size/family), and that all works great. The problem I'm having is that I want the style to set my buttons and boxes to the correct styling for where the caret is. Say, for example, I have the string the quick brown fox jumps over the lazy dog When I click between the u and i in quick, I want my italicize button to be toggled on to indicate that the text where the

Polymer, paper-datatable styling of rows

蓝咒 提交于 2019-12-11 13:25:42
问题 I'm trying to colour the rows of paper-datatable using the attribute customRowStyle This Plunk of paper-datatable is working, rows are colored, but it's not enclosed as separate Polymer element. I need to enclose paper-datatable in separate element. Need some help to fix this: how to make customRowStyle(item) to get called on table render and pass the item ? <paper-datatable data="{{data}}" custom-row-style="{{generateRowCss}}" on-row-tap="row_tap"> <paper-datatable-column header="title"

Rails: Css appears to be different in dev and production

夙愿已清 提交于 2019-12-11 11:07:08
问题 i have a standard rails 4/heroku setup. One thing is weird: The different elements of the page appear in different sizes for the local environment and for the production environment. For example: Although the header-height is set to a specific pixel value it is different in height for the two environments. Same with the width of the content: I set a max-width of 1260px - the width of the content is different for the two environments. Everything appears bigger in production. I found one

Work around to make table-cell CSS render properly in IE6/7?

半世苍凉 提交于 2019-12-11 10:35:40
问题 My site is showing up fine in IE8/Firefox/Chrome but I can't figure out how to make it function with IE. The relevant CSS: #maincontent { display: table; } #content { display: table-cell; width: 620px; padding-left:4%; padding-right: 22px; padding-bottom:15px; } #sidebar { display: table-cell; width: 300px; } #content and #sidebar are in #maincontent . On IE6/7 #sidebar will be under #content . I've tried setting the sidebar to display:block with a float , and it will then render fine in IE6

Adding style to a ButtonCell

二次信任 提交于 2019-12-11 09:39:12
问题 I know my question is considered initially to refer to the "very novice" level, but I have spent quite o lot of time on searching for the answer. I have used in a gwt application a DataGrid and I have attached a diversity of specific Cell widgets (i.e. TextCell, ButtonCell). My concern is how I can add and handle styling to the button of a ButtonCell through custom css. The code which implements the column of ButtonCells looks like as follows: Column<FilterInfo, String> delButtonColumn = new

Is there any way to increment a CSS value depending on nth-child variable?

陌路散爱 提交于 2019-12-11 09:20:16
问题 This is probably a long shot but, here it goes: I have this: <style> .select-option.hidden:nth-child(2) { top: 65px; } .select-option.hidden:nth-child(3) { top: 100px; } .select-option.hidden:nth-child(4) { top: 135px; } .select-option.hidden:nth-child(5) { top: 170px; } .select-option.hidden:nth-child(6) { top: 205px; } </style> I want something like this: .select-option.hidden:nth-child(n+2) { top: (30+((n-1)*35))px; } Starting at the second child and at offset = 30px and adding 35px to

WPF: How do I programmatically style my ListView so that all rows have a certain background color and height?

爷,独闯天下 提交于 2019-12-11 06:37:54
问题 I can't seem to wrap my head around something. Say I have the following logic in my code: namespace WPFTesting { /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { ObservableCollection<Message> messages = new ObservableCollection<Message>(); public MainWindow() { InitializeComponent(); messages.Add(new Message(DateTime.Now, "This is a test.")); ListView listView = new ListView(); GridView gridView = new GridView(); listView.View =

How to read inline styling of an element?

前提是你 提交于 2019-12-11 06:36:27
问题 I'd like to know if it's possible to determine what inline styling has been attributed to an HTML element. I do not need to retrieve the value, but rather just detect if it's been set inline or not. For instance, if the HTML were: <div id="foo" style="width: 100px; height: 100px; background: green;"></div> How can I determine that width , height , and background have been explicitly declared, inline? As far as I can tell, the solution can work two ways. I can ask it if a specific attribute is