stylesheet

Change CSS class content from javascript [Firefox/XUL]

≡放荡痞女 提交于 2019-12-11 04:53:00
问题 I'm working on a firefox addon, and relies heavily on some dynamic changes with javascript. There are some UI elements (hbox/descriptions), which are styled using CSS classes. Now I wish to change the a CSS class defintion from javascript, without having to work element id's. Is it possible ? Similar questions had been asked before, but most of them are using php to generate a CSS or jquery based changes. Here's an example for my scenario: My XUL : <box id="firefox-addon-box"> <description id

How do I make my selectors more specific?

南楼画角 提交于 2019-12-11 04:52:12
问题 In a page I use a tabstrip with its own stylesheets. This tabstrip writen with divs and anchors. I add some other divs into tabs but they inherit stylesheet from the outer tabstrip. This new divs has their own css classes. Here is my question, are there a way to break this inheritance without changing the structure of css ? Tabs' CSS Styles : div.tabs { padding: .5em; } div.tabs div.tabs { padding: 0; } div.tabs div.tabs div { clear: left; height: 4em; padding: .5em; border: 1px solid #003366

usage of * symbol in css

女生的网名这么多〃 提交于 2019-12-11 04:43:01
问题 I found some stylesheets using * symbol on it. for example *zoom: 1; what does the * symbol stands. sometimes which appears like [class*="span"] this. can anybody clear me the usage of the symbol * in css 回答1: *zoom is a hack that applies it ie6 and ie7. * { } is a wildcard (matches all elements or subset; if used like #header * it would apply to all descendants of #header ). [class*="span"] matches elements that have a class with the word "span" anywhere. 回答2: If * is used an independent

Is using the style attribute frowned upon?

余生长醉 提交于 2019-12-11 01:36:17
问题 As someone who is beginning to make a transition from table based design to full CSS I'm wondering if using the style attribute to make adjustments to elements is considered "cheating" and if absolutely ALL presentation should be strictly in the style sheet? See also: A question of style - approaches to styling and stylesheets 回答1: There are cases where you know for sure that all you want to do is tweak the style of this one specific element, and nothing else. In those cases you can happily

With Symfony 3, how to display a read-only field as a label ? (in FOSUBundle's registration form)

房东的猫 提交于 2019-12-11 01:27:26
问题 Using Symfony 3 and overridden FOSUserBundle's registration form, I have a readonly field: ->add('name', TextType::class, array('attr' => array('readonly' => true))) For now, it appears as a textbox, but I would like it to appear as a text/label instead. I see nothing such as "LabelType". Is it possible to do this? 回答1: It look like you need customize the appearance of the textbox when it has the readonly attribute. So the simple solution could be a single CSS style: // style.css input

Error when using link href inside my ContentPlaceHolder

最后都变了- 提交于 2019-12-11 01:04:13
问题 I am using a MasterPage in my project... This this the link i need to place inside my ContentPlaceHolder of my Dedault.aspx page <link href="jquery/imagebox/imagebox.css" rel="stylesheet" /> But i get a error "Element link cannot be nested within element td" Any idea what to do? 回答1: You can only place stylesheet links in the header of the document. Here's a link how to do that from a ContentPlaceholder: http://www.odetocode.com/articles/450.aspx Quote: Protected Sub Page_Load(ByVal sender As

document.styleSheets[x].cssRules are null

你说的曾经没有我的故事 提交于 2019-12-10 20:56:02
问题 When I inspect a website, I see the cssRules from document.styleSheets[x].cssRules However, with this website stackoverflow.com , when I inspect with Chrome browser, I see document.styleSheets , but cssRules is null. How come this is possible? 回答1: That's because the style sheets are coming from a different domain. Some browsers (such as Chrome) implement strict cross-domain policies by throwing security errors or setting the cssRules and ownerRule to null when it comes from a different

Adding CSS to Facebook Like Box

梦想与她 提交于 2019-12-10 20:12:59
问题 I'm trying to add css styling to Facebook Like Box XFBML file but it doesn't take the stylesheet the regular way – its own stylesheet comes after yours. So I did some search and found posts that said to add css="youstylesheetlink.css" to the fb:like-box like this: <fb:like-box href="https://www.facebook.com/example" width="496" height="120" show_faces="true" border_color="" stream="false" header="false" css="http://example.com/css/style.css?2"></fb:like-box> But no matter what I try it doesn

Style QComboBox popup menu margin Qt 4

孤街浪徒 提交于 2019-12-10 18:53:15
问题 After countless hours trying to style a QComboBox, I'm stuck with the top and bottom margin where the items are inserted. I would like to either remove or apply a background-color to the popup menu top and bottom white spaces. QComboBox screen http://img576.imageshack.us/img576/3402/screenshot20120130at144.png I added a min-height to the QListView not to show top and bottom arrows. I also looked at the QComboBoxPrivate class in Qt sources but it seems that the top and bottom margins are

JasperReports: Not support & sign when i use style

两盒软妹~` 提交于 2019-12-10 18:32:37
问题 Working in JasperReports : <style pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true" forecolor="red">Instruction and instruction</style> Not Working in JasperReports : <style pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true" forecolor="red">Instruction & instruction</style> Why this is happening? 回答1: I have used &amp; instead of "&" and it is working in jasper report. <style pdfFontName="Helvetica-BoldOblique" isBold="true" isItalic="true" forecolor="red"