styling

Svg - color background/overlay of a text element

你。 提交于 2019-12-01 06:09:29
问题 I'm just starting on svg and trying to figure out the limitations of styling. I have an svg text element in svg. Some of my text elements are tagged with data-editable="true". I would like for users to be able to easily see what the tagged elements are. I'm imagining a simple, toggleable, translucent overlay. When I hover over the element in the DOM view in chrome the text element is rendered with a blue-ish overlay. I would like to get a similar effect or something that is somewhat close. I

Chrome search feature (ctrl+f) finds hidden text ( but it's invisible! )

时光总嘲笑我的痴心妄想 提交于 2019-12-01 03:08:51
Look at this fiddle . Enter Ctrl + F and search "gets" ... For me Chrome finds invisible text from this text: A long option that gets cut off It's reproduced on Linux/Ubuntu 12.04 Chrome Version 31.0.1650.63 HTML <!--works for a div--> <div> A long option that gets cut off </div> <!--but not for a select--> <select> <option>One - A long option that gets cut off</option> <option>Two - A long option that gets cut off</option> </select> CSS select { width:100px; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; } div { border-style:solid; width:100px; overflow:hidden; white-space

WPF - Margin in percentage

与世无争的帅哥 提交于 2019-11-30 21:13:06
I have just started using WPF. I'm getting my head around styling system since. I come from a CSS background and I would like to set margin in percentage. <Style TargetType="TextBlock" x:Key="workflowNameTextBlock"> <Setter Property="Margin" Value="50"/> </Style> Currently value is set in pixels, but I would like to set it in %, i.e. 50%. How can I achive this? Thank you Here's how you implement 20% left and right margins in WPF: <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="2*"/> <ColumnDefinition Width="6*"/> <ColumnDefinition Width="2*"/> </Grid.ColumnDefinitions> <TextBlock Grid

How to style a PHP echo text? [closed]

我是研究僧i 提交于 2019-11-30 20:08:15
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 6 years ago . I have the follow code; <?php function countryCityFromIP($ipAddr) { $url = "http://api.ipinfodb.com/v3/ip-city/?key=5cfaab6c5af420b7b0f88d289571b990763e37b66761b2f053246f9db07ca913&ip=$ipAddr&format=json"; $d = file_get_contents($url); return json_decode($d , true); } if(isset($_REQUEST['submit']))

Print Stylesheets for pages with long horizontal tables

爷,独闯天下 提交于 2019-11-30 20:07:23
I have a page that spits out db data in long horizontal tables. I need to print it nicely so it does not cut off. Any tips ? If it doesn't fit on the paper in a readable font, it just doesn't.. In my opinion, huge horizontal tables (be it a HTML table or an Excel sheet with many columns) don't lend well to printing. For that matter, they don't lend well to viewing on a screen either. Remember vertical scrolling is much easier for your users than horizontal scrolling - all thanks to that little wheel on your mouse. Worst case, you might need to write a seperate print version which uses a

How to apply multiple css radial gradients to a single element

陌路散爱 提交于 2019-11-30 15:50:59
I have the following style applied to my div element: background-image: -moz-radial-gradient(50% -10%, ellipse closest-corner, rgba(5, 5, 5, 0.7), rgba(0, 0, 0, 0) 100%); This has the desired effect (being an inner drop shadow only at the top of the div ). I would like to apply the same effect at the bottom of the div . The following line does it well, but it seems to override the first, so I can only get one or the other. background-image: -moz-radial-gradient(50% 110%, ellipse closest-corner, rgba(5, 5, 5, 0.7), rgba(0, 0, 0, 0) 100%); Can someone show me how I can have multiple radial

Qt 5 Styling: dynamically load qml files

我是研究僧i 提交于 2019-11-30 15:48:33
I am currently trying to extend our application with different style. For each style I have a separate qml file with e.g. color definitions. StyleA.qml: import QtQuick 2.0 QtObject { property color textColorStandard: 'black' ... } In my main.qml I would like to load the right qml file, based on a software property: import QtQuick 2.0 Item { id: mainPanel .... Loader { id: myDynamicStyle source: Property.UseThemeA? "StyleA.qml" : "StyleB.qml" } ... Item { id: BackGround color: myDynamicStyle.textColorStandard } } unfortunately this approach does not work. Is there any other/better way to

Qt QListWidgetItem Multiple Lines

不打扰是莪最后的温柔 提交于 2019-11-30 14:24:53
问题 I have a really simple QListWidget object and I want to build a folder list. When I add an item to my list here is what I do : void LessCC::on_addFolderButton_clicked() { QString dirName = QFileDialog::getExistingDirectory(this, tr("Choose Directory"), QDir::homePath(), QFileDialog::ShowDirsOnly); QListWidgetItem* newItem = new QListWidgetItem(QIcon(":/resources/icons/folder.png"), dirName, 0, 0); this->ui->folderListWidget->addItem(newItem); } This is working but I want my items to have

How to place a ScrollViewer on top of the content it should scroll

半腔热情 提交于 2019-11-30 13:13:17
I would like to put my ScrollViewer in such a way that it overlaps/sits on top of the content it scrolls. I would set the Opacity of the ScrollViewer so that the content is visible underneath. As far as I understand the default ScrollViewer, this doesn't seem to be possible out of the box since the content is nested inside the ScrollViewer. Any ideas on how to make this work? EDIT: I understand that the ScrollViewer is a Decorator and that the content is not aware of the ScrollViewer. This separation is good and I don't want the content to be aware of the ScrollViewer. What I try to do is a

How can I make an Upvote/Downvote button?

血红的双手。 提交于 2019-11-30 11:02:54
问题 This is just for the styling, I'm trying to make an upvote/downvote the same way that it's done on SO and Reddit, from what I can see they use arrow images as backgrounds and then position it, but I'm a CSS newbie and I need someone to walk me through it. Thanks in advance. 回答1: You could do it by adding a different picture to the background, one for every state of the button. There is however a cleaner, easier, more modern way of achieving this result: Sprites. A sprite is an image that is