w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Selecting Using XSL Stylesheets
To get Student number you should put new TD as <td><xsl:value-of select="students/student/@student-number"/></td>. And if you want to get information of last student only, you should use predicate like <xsl:value-of select="students/student[last()]/@student-number"/>

Categories : Xml

Why can't I switch my stylesheets?
I believe you need to complete add or remove the link elements from the DOM... Not just disable them: http://www.javascriptkit.com/javatutors/loadjavascriptcss.shtml

Categories : Javascript

Dynamically load stylesheets
You can add/remove/edit link tags in your head area with java script to add/remove stylesheet files. Code example: Add a stylesheet to the head: var newstyle = document.createElement("link"); // Create a new link Tag // Set some attributes: newstyle.setAttribute("rel", "stylesheet"); newstyle.setAttribute("type", "text/css"); newstyle.setAttribute("href", "filename.css"); // Your .css File document.getElementsByTagName("head")[0].appendChild(newstyle); To remove or edit a stylesheet you can give every stylesheet an id attribute and access it with this: document.getElementById('styleid') Or you can loop through all link tags in the head area and find the correct one but I suggest the solution with the ID ;) Now you can change the href attribute: document.getElementById('styleid').

Categories : HTML

Javascript Styling vs CSS stylesheets
CSS is a lot more maintainable than JavaScript and you can do things with CSS that are very hard to mimic with JavaScript. Mechanics like add/remove_class enable you to make full use of CSSs dynamics. Your sample code looks like it's doing some dimensional calculation. CSS can't always deal with this so maybe for this limited usecase JavaScript is better.

Categories : Javascript

Stylesheets with File Dialog
Actually, there is a way that you can apply stylesheet to File-Dialog. Some default UI views may be QDialog's, in this case there exist a UI method, called QFileDialog, documentation here. So if you want to set stylesheet on the QFileDialog you can do this: QFileDialog dialog; dialog.setStyleSheet("QPushButton { background-color: red }"); dialog.exec_();

Categories : Python

How to selectively add stylesheets to UIWebView?
Well, after much trial and error, I discovered that if instead of setting the href of the link with: newStylesheetLink.href=<value>; I instead set it with: newStylesheetLink.setAttribute('href', <value>); everything works. In other words, if I use the setAttribute method instead of the .href notation, it works. Why this should be so is beyond me, especially since the .rel and .type assignments work just fine. (Could it be that in iOS the setAttribute method resolves the path of the stylesheet in the app's bundle, while the .href assignment doesn't?) So, this revised script actually works: <script type="text/javascript"> window.onload = function() { var newStylesheetLink = document.createElement('link'); newStylesheetLink.rel = 'styleshee

Categories : IOS

Media Query Stylesheets
First off, your iPhone 4/5 media queries will also include alot of other phones with those pixel ratios. Secondly, what stylesheet will load for browsers that don't support media queries or those browsers that have their window < 978px? The best way to handle the root of this problem (:hover rules for touch devices) is to just serve one stylesheet to every browser and tuck your hover rules behind feature detection, like Modernizr. Get Modernizr and include it in your <head>. Once it's loaded correctly tuck your :hover css rules behind .no-touch in your CSS and it will only apply to those browsers that don't have touch screens.

Categories : Misc

Firefox does not recognize my Stylesheets
If the style sheet is in the same root, you don't really need the whole link to the root when getting the style: <link rel="stylesheet" href="./styles.css" type="text/CSS" />

Categories : HTML

Disabling or hiding stylesheets, how do you do it?
You should ideally be using a separate stylesheet for each of your "themes". You could then only load the correct stylesheet at runtime or: Use javascript to create / destroy css link elements in the head Use javascript to add a class to the body tag 'red' or 'blue' etc. Then have every selector in your theme begin with that class name: .blue .header { background: red; }

Categories : Javascript

What is the right way to use relative paths in less stylesheets in Rails?
After some more research I found it is OK to use relative paths hence this should work. I found it is an open issue with less-rails gem: https://github.com/metaskills/less-rails/pull/64 Hopefully we can solve this in short time.

Categories : CSS

Wordpress stylesheets and other files not linking up
Unless I'm missing something, on your page your CSS etc seems to start "/plugins..." for instance although should be "/wp-content/plugins..."? Although, the ones starting "/assets" don't seem to exist no matter what I try. I suggest looking over your folder structure and adjusting your links accordingly in (most likely) the header.php for that theme.

Categories : PHP

styleSheets & rules undefined in IE10
I'm not sure why it might be working in other browsers, but accessing a style-sheet and a rule requires square brackets: var oRule=document.styleSheets("panoramaCSS").rules("12pxHoverColorChange"); shoud be var oRule=document.styleSheets["panoramaCSS"].rules["12pxHoverColorChange"]; The reason for the error is that IE is interpreting the parentheses as a call to a function that doesn't exist. This quirksmode page should be useful.

Categories : Javascript

Cant add stylesheets to iframe in internet explorer
You can not style elements from an iFrame as technically they don't exist on the page but exist on another server. You can however style if the iFrame comes from the same server - its a security issue. 3rd party nightmares I know but that's the way it is. You can only ask them to install your style on their server or ask them to change the styling of the content themselves to suit you.

Categories : Jquery

Apply different stylesheets for both Android and iPhone
Its quite simple: $('head').append( $('<link rel="stylesheet" type="text/css" />').attr('href', 'your_stylesheet_url.css') ); or document.createStyleSheet('your_stylesheet_url.css');

Categories : Javascript

Why simply use PHP variables for dynamic stylesheets?
Am I overlooking some serious problems by doing it this way? I host all static assets on a CDN, which you should too. CDNs don't do PHP. Also: caching, runtime performance, minification

Categories : PHP

None of the included stylesheets and javascripts are being precompiled
the problem here was, in my application.js file the require_tree was last line, I moved it to the top and the problem was solved. and for all the style sheets I included them in my application.html.erb separately. Since my application is small it was not an issue, I wouldnt recommend this though

Categories : Ruby On Rails

Zend Framework 1.12 can't add stylesheets from view templates
At the point that $this->render('_slider.phtml', 'slider'); is called headLink(); ?> has already occured. The only real options here is to call <?php echo $this->render('_slider.phtml', 'slider'); ?> prior to the headLink call. You can do this by reordering your code like this: <html> <head> <?php $slider = $this->render('_slider.phtml', 'slider'); ?> <?php echo $this->headMeta(); ?> <?php echo $this->headLink(); ?> <?php echo $this->headStyle(); ?> </head> <body class="body"> <?php echo $this->render('_top.phtml'); ?> <?php echo $slider; ?> <?php echo $this->headScript(); ?> </body> </html>

Categories : PHP

Why do stylesheets not work when subclassing QWidget and using Q_OBJECT?
If you want custom QWidget subclasses to support stylesheets, you need to provide the following code: Qt Code: void myclass::paintEvent(QPaintEvent *pe) { QStyleOption o; o.initFrom(this); QPainter p(this);

Categories : Qt

How to save as SVGZ with external stylesheets in Illustrator
I don't know whether SVGZ will work with CSS but SVGZ is a SVG compressed with GZIP. You can change SVG to SVGZ this way: get SVG file : example.svg remove extension .svg : example compress using GZIP : example.gz change extenson to .svgz : example.svgz

Categories : CSS

Stylesheets Missing - Ruby On Rails Application
You might need to change this setting to true - config.serve_static_assets = true in the environment/production.rb file. It's false by default in production. http://guides.rubyonrails.org/configuring.html#rails-general-configuration Update The above is Rails 3 only, my mistake. PassengerAppRoot should point to the app root, and not public

Categories : Javascript

Compiling closure stylesheets in java (like SoyFileSet)
There is a java jar you can run from the command line called closure-stylesheets.jar. You can download it here : https://code.google.com/p/closure-stylesheets/downloads/list We run it through an Ant task like this: <target name="closure-stylesheets"> <java jar="closure-stylesheets/closure-stylesheets.jar" fork="true" failonerror="true"> <arg line="--output-file ../styles/closure.css"/> <arg value="closure-stylesheets/closure-main-def.gss"/> <arg value="closure-stylesheets/closure.gss"/> <arg value="closure-stylesheets/tree.css"/> </java> </target> If you are using Soy templates and want to use closure's CSS renaming capabilities, look here (I'm not familiar with using this) :

Categories : Misc

Add stylesheets to rails static HTML page
You should put all your HTML pages (static or not) in view folder if you want to use assets pipeline. Don't forget that assets are dynamically generated, compressed and named so there is no way you can include them manually (without painful hacks). Another solution is to put your stylesheets in /public folder together with your static HTML.

Categories : HTML

Rails stylesheets placed in assets don't show on website
Have you precompiled assets? bundle exec rake assets:precompile You don't need to manually move any any custom css or js. Precompile your assets then try pushing again. My production.rb file has these relevant lines: config.assets.precompile += %w( application-all.css application-print.css ) config.assets.compile = false config.serve_static_assets = false

Categories : Ruby On Rails

How to receive and display HTML emails with stylesheets?
Email doesn't support external style sheets, so all CSS on a html email is in the page style tag, or inline. As it is standard for clients like gmail and yahoo to strip the style tag, and everything else outside the body tags, you could simply do the same. Limiting incoming emails to inline styles will keep all CSS local to those elements. It is pretty much email design 101 to inline the css, so you don't have to worry about your email system being less than what is standard. Web clients also strip many CSS elements in addition to this. Don't want someone adding position:fixed; for example as it would break out of the viewing pane. The best reference for what CSS is allowed in each client is Campaign Monitor's CSS guide.

Categories : CSS

Why are all of my stylesheets being included on my page when using assets pipeline?
This is the expected behavior if you are running the Rails application in the development environment (the default). By default, development is configured with config.assets.debug set to true, which causes all asset files to be served individually to ease debugging - the browser's CSS inspector will show you the correct file a rule originates from, rather than always pointing to the single generated single. However, if you precompile and run the app in the production environment, only one file is generated and served. You can test this by running the following commands: RAILS_ENV=production rake assets:precompile RAILS_ENV=production rails server If you visit your site now, you should see only a single application.css file with all of your stylesheets combined. (Make sure your config/e

Categories : CSS

How to change QPushButton icon/text spacing with stylesheets?
Actually with QPushButton you are out of luck. You can find a complete list of working options for styling push buttons in the qt documentation ( I am assuming you use qt5, but it is available for other versions as well). What is often recommended if you want more control over the icon is to exchange your QPushButtons with QToolButtons wich are exactly the same except that they have extra features to make them compatible with toolbars -and- they have more options for icon placement. But this might not work for you because as you can see they are styled the exact same way as QPushButtons. But do look into the "toolButtonStyle" parameter which allows you to move the icon around. Next on the list comes changing the artwork. If all you want is more space then just add the extra empty pixels

Categories : Qt

Using gem 'twitter-bootstrap-rails' , how to get scss extension for stylesheets?
twitter-bootstrap-rails works with less files. If you want scss files you could work with the bootstrap-sass gem https://github.com/thomas-mcdonald/bootstrap-sass

Categories : Ruby On Rails

Wordpress Creating Theme - Linking Bootstrap stylesheets
Have you tried bloginfo('template_directory')? does it give the right path? You could insert additional link tags to include your stylsheets, like: <link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/bootstrap.min.css" type="text/css" media="screen" /> An other solution could be to use: @import url('bootstrap/css/bootstrap.css'); in your main css file. So use in your template <link href="<?php bloginfo('stylesheet_url');?>" rel="stylesheet"> this wil include style.css: style.css: @import url('bootstrap/css/bootstrap.css'); @import url('bootstrap/css/bootstrap-responsive.css'); body { padding-top: 60px; padding-bottom: 40px; } Which part don't work? Have you include the bootstrap-responsive.css too? Have you include the boots

Categories : Twitter

Safe imports of libraries in multiple LESS or SASS stylesheets
Is including bootstrap into the less files an option for you, like you do in development? My approach in SCSS is like that: style.scss (doesnt have any own declarations) imports bootstrap.scss first then imports site specific .scss files, which may contain overrides. By doing that I can fully control the order of the files and therefore the order of declarations in the generated css file. Of course one has to decide to trade in the ability to let Bootstrap load via CDN when included, but in my case I use a very down narrowed version of Bootstrap anyway.

Categories : HTML

What priority/precedence is applied to multiple xsl:imported stylesheets?
See http://www.w3.org/TR/xslt20/#import and "[Definition: The stylesheet levels making up a stylesheet are treated as forming an import tree. In the import tree, each stylesheet level has one child for each xsl:import declaration that it contains.] The ordering of the children is the declaration order of the xsl:import declarations within their stylesheet level. [Definition: A declaration D in the stylesheet is defined to have lower import precedence than another declaration E if the stylesheet level containing D would be visited before the stylesheet level containing E in a post-order traversal of the import tree (that is, a traversal of the import tree in which a stylesheet level is visited after its children). Two declarations within the same stylesheet level have the same import prece

Categories : Xml

Rails 3 command to embed text of my CSS stylesheets in head of my HTML
Placing the following code right in the head section of your application.html.erb should work: <style> <%= render :file => Rails.application.assets.find_asset('print') %> </style> Of course, if you're including stylesheets from several different views, you'll want to setup a yield in application.html.erb instead: <style> <%= yield(:inline_style) %> </style> Then from each view: <% content_for :inline_style %> <%= render :file => Rails.application.assets.find_asset('**stylesheet name**') %> <% end %> Or, if you still want to use the asset pipeline, see How to inline css when using the rails asset pipeline

Categories : CSS

Apache reverse proxy with digest auth prevents stylesheets from Amazon S3
My guess is that your proxy is sending the Authorization header to S3 and S3 responds with that error. This is because S3 uses the same Authorization header to authorize API requests and it does not support basic or digest authentication on it's own. Do a test towards a local backend and verify what request headers are being sent by the proxy. If the Authorization header is indeed present, rewrite the request on the proxy to remove it before it's sent to the S3 backend.

Categories : Apache

Creating valid conditional comments for stylesheets, without a 'bogus comment' validator error
This should work. <link rel="stylesheet" href="Scripts/styleMain.css" media="all" type="text/css" /> <!--[if gte IE 9]> <link rel="stylesheet" href="Scripts/styleMob.css" media="screen and (max-width:500px)" type="text/css" /> <link rel="stylesheet" href="Scripts/styleDes.css" media="screen and (min-width:501px)" type="text/css" /> <!--<![endif]--> <!--[if lt IE 9]> <link rel="stylesheet" href="styleDes.css" type="text/css" /> <![endif]-->

Categories : HTML

stylus is not compiling stylesheets (nodejs express jade stylus and nib)
Figured it out https://github.com/LearnBoost/stylus/issues/122 a request to /css/style.css interprets to /src/css/style.styl

Categories : Node Js

Javascript document.defaultView or document.styleSheets?
document.styleSheets is the list of the actual stylesheet or sheets loaded into the page. Fun fact: you can dynamically create new "stylesheets" and add them to this list, without actually loading separate files. If you are looking up the current style of an element, the question you need to ask is, "do I care more what the stylesheet SAYS the style should be, or do I care more what the actual current (computed) style is?" The circumstances will determine which is more appropriate. If you care about the original declared styles, you'll want to consult the stylesheets themselves. However, this is quite a bit more complex than it may seem, because you're going to have to parse the files and find all the cascading styles that would apply to the element in question. If you care about what t

Categories : Javascript



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.