stylesheet

Why is there the need for browser resets?

给你一囗甜甜゛ 提交于 2019-12-10 18:14:00
问题 Okay that's probably not the best title, I know why we need browser resets: because browsers have different defaults set. My question that was too long to put into a title is: If everyone needs to use a reset stylesheet 90% of the time, why do browsers need to set default styles? We're just going to remove them anyways, right? 回答1: Because certain rules make sense by default: Table cells have display:table-cell; <b> makes text bold, <i> makes text italic Paragraphs should have space in

IE8 doesn't apply css display dynamically

别来无恙 提交于 2019-12-10 17:44:38
问题 I'm trying to develop a table that hides its columns upon a given value. I am using a solution discussed in another SO question. As part of the suggestion there they say that to support IE<8 browsers a hide rule should be used instead and show by default. (My browser is in quirks mode). I have several hide rules that look like the following. table.Show1 .cellType2, table.Show1 .cellType3{ display:none; } So what I expect is cellType2 and cellType3 to hide when the className of the table is

How to set input:focus style programatically using JavaScript

不想你离开。 提交于 2019-12-10 17:24:23
问题 I'm building a UI library in JS that can, without relying on any CSS stylesheets, create UI components, stylised from code. So far, it's been quite easy, with exception of styling different control states (such as input:focus one). Code that I use to create input field: function newInput() { var ctr = docmuent.createElement("input"); ctr.setAttribute("type","text"); ctr.setAttribute("value", some-default-value); ctr.style.fontFamily = "sans-serif,helvetica,verdana"; /* some font setup here,

Is there a syntax to resolve ambiguity in CSS class names between two style sheets?

被刻印的时光 ゝ 提交于 2019-12-10 16:38:50
问题 Let's say I have an HTML page that imports two style sheets like so: <link href="Styles1.css" rel="stylesheet" type="text/css" /> <link href="Styles2.css" rel="stylesheet" type="text/css" /> Also assume that a class with the same name appears in both of the above style sheets. .SomeStyle {font-weight:bold; } /* in Styles1.css */ .SomeStyle {font-weight:normal;} /* in Styles2.css */ Question : Is there a syntax where I can apply the class to an element in a way that disambiguates which version

How to set color of child QLabels while hover parent QFrame with QSS?

瘦欲@ 提交于 2019-12-10 15:56:32
问题 I'm trying to set the hover state color of 2 labels inside a QFrame with a stylesheet, but the frame takes the hover states regardless if there is an actual hover: See screenshot: I've got a QFrame with QLabels. I set the default colors to green and purple. While i hover the QFrame, the color of both labels should go red. The exact same CSS does work with html, but i can't seem to get it to work with the QT stylesheets. div{background-color:black; width:200px; height:100px;} #label1{color:

Is it a bad idea to let users add their own stylesheet?

做~自己de王妃 提交于 2019-12-10 15:34:32
问题 I'm new at php and I'm trying to figure out of this is a bad idea or a security risk. I have a table of data that I provide to a user, it has a default stylesheet that it loads, but if the user wants to include their own, I've made it so they can just point to their stylesheet instead: http://www.mysite.com/info.php?css=http://www.someothersite.com/mystylesheet.css I've tried adding closing style tags and javascript in the css file, but the DOM seems to just load it as CSS that it isn't able

Can I programmatically traverse a CSS stylesheet?

怎甘沉沦 提交于 2019-12-10 15:08:28
问题 jQuery provides a nice, neat way to traverse the DOM...what I'm looking for is a way to traverse a stylesheet, getting and setting attributes for the defined styles. Example Stylesheet div { background: #FF0000; display: block; } .style { color: #00AA00; font-family: Verdana; } html body > nav.menu { list-style: none; } Now imagine the following code is like jQuery for CSS... Getting values from the CSS $("div").attr("background"); //returns #FF0000; $(".style").attr("color"); // returns

What is “User stylesheet” in Google Chrome's developer tools?

孤者浪人 提交于 2019-12-10 13:29:10
问题 I know about user agent stylesheet but I am seeing user stylesheet only on some specific sites in the Styles section of the developer tools, even though there is no Custom.css in my User Stylesheets in my Chrome Profile. 回答1: These "User stylesheet"s are added by Chrome extensions, either declared in a manifest file, or using chrome.tabs.insertCSS. Styles on the web page always take precedence over the user stylesheet, unless the rule set in the (extension's) user stylesheet has a higher

Limit Stylesheet to one tag and descendents

主宰稳场 提交于 2019-12-10 12:58:06
问题 I want to use twitter bootstrap for some site I am working on. This site requires a pre-set template to be used for certain parts of the page. If I include the twitter bootstrap stylesheet it messes up the original template. I want to include the external bootstrap.cc stylesheet but make it work only on tags which are a descendent of class="mycontent" <html> <link href="original stylsheet.css"> <link href="bootstrap.css"> ... ... <div class="header"> original stlesheet to be used here </div>

:after, :before issues in internet explorer 11

我与影子孤独终老i 提交于 2019-12-10 12:33:00
问题 In my website design, I am using :before and :after pseudo elements. These are working good in Google chrome and firefox. But having trouble with internet explorer. The code I am using is #nav ul li.active:after { border-left: 20px solid transparent; border-right: 20px solid transparent; content: ""; border-top: 13px solid rgba(2,155,223,0.9); position: absolute; bottom: -13px; width: 0px; margin-left: -20px; } and out puts are 1.In google chrome 2.In internet explorer 11 is IE preventing