w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How can I make my elements fade in and out as their display attributes are changed in Javascript?
Is it what you need? function divSelector(count){ if (count == 1){ $('#second-about-text').fadeOut(); $('#third-about-text').fadeOut(); $('#first-about-text').fadeIn(); } else if (count == 2){ $('#second-about-text').fadeIn(); $('#third-about-text').fadeOut(); $('#first-about-text').fadeOut(); } else if (count == 3){ $('#second-about-text').fadeOut(); $('#third-about-text').fadeIn(); $('#first-about-text').fadeOut(); } else{ console.log("Count is nothing.");

Categories : Javascript

Chrome 30 and the width of elements of type display: table-cell?
I'm having similar issues. I think the problem is a regression in chrome 30. See https://code.google.com/p/chromium/issues/detail?id=290399 . Another post about this exists here: Calculated width wrong in Chrome, fine in FFox / IE?

Categories : Javascript

Why does 100% height work inside a display:table-row on Chrome & FF but not in IE9?
Web browsers often tries to fix your bad-coding, but only smarter ones will succeed! When you use table display type such as table, table-row for some elements, It's supposed to use table-cell for inner elements too. That's what you've forgot: .this-will-expand-to-100-percent-in-IE { display: table-cell; height:100%; } Here is the CodePen Demo. By the way, in this case, I'd prefer to use Ryan Fait's Sticky footer (instead of using a CSS table layout). You could also find a snippet on CSS-Tricks.

Categories : HTML

Sorting DOM elements does not work propperly on mobile devices(android browser, chrome, safari)
I found a solution to the problem. $('div#mainFrame div.element-container').sort(function(a, b) { return parseInt($(b).data('price')) - parseInt($(a).data('price')); }) .appendTo('div#mainFrame'); The reason for this is that the sort expects a number, not a boolean return value.

Categories : Javascript

Using ready() function to set elements to display but $(this) won't work?
Set them after the page load inside a DOM ready function: $(document).ready(function() { $('.share-button').css("display","inline"); }); API: http://api.jquery.com/ready/

Categories : Javascript

Extra padding only in Chrome
Try adding line-height: 0; to the div: #mailing div { line-height: 0; } Try also adding: #mailing .moduletable { display: table; } Updated jsfiddle: http://jsfiddle.net/BbJhE/12/

Categories : HTML

Padding appears on chrome browser only
I also see a difference in your site between Chrome and IE10. After inspection, I can see that for some reason this snippet causes some issues: #nav-container { margin-bottom: 3em; } A little bit further, I can see this snippet: #nav-container { border: 1px solid #d9d9d9; border-width: 1px; background: #fff; background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#f5f5f5)); background: -webkit-linear-gradient(#ffffff, #f5f5f5); background: -moz-linear-gradient(center top, #ffffff 0%, #f5f5f5 100%); background: -moz-gradient(center top, #ffffff 0%, #f5f5f5 100%); margin: 0 0 1em 0; } Set the margin-bottom of both snippets to 0 and the result will be as expected!

Categories : HTML

How do I fix CSS padding issues between Firefox & Chrome?
What you need is called a CSS reset. http://meyerweb.com/eric/tools/css/reset/ This isn't going to fix your issues (debugging is all you can do at this point) but in the future you should use a reset before you start and it'll prevent having cross browser issues (for the most part).

Categories : HTML

Removing elements that have no attributes, child elements, or text during transform
This should do the job: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt"> <xsl:output indent="yes" method="xml" omit-xml-declaration="yes"/> <xsl:strip-space elements="*"/> <!-- Elements/attributes to remove. Note that comments are not elements or attributes. Since there is no template to match comments they are automatically ignored. --> <xsl:template match="@*[normalize-space()='']|info|@file_line_nr|@file_name"/> <!-- Match any attribute --> <xsl:template match="@*"> <xsl:copy> <xsl:apply-templates select="@*"/> </xsl:copy> </xsl:template> <!-- Match any element --> &l

Categories : Xml

border, padding property of
In addition to what @Mr. Alien wrote, There is no cross-browser way of styling <option> purely with CSS. You can take a quick look here for a plugin or search for some others plugins which are more suitable for your needs.

Categories : CSS

Extra padding or margin on custom font in Chrome
FOR LIVE DEMO Bebas Neue is available on direct link source. margin 0 and padding 0 functions seem to be working fine. tested in Chrome - works tested in IE7 - works <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src='http://cdn.renderedfont.com/js/renderedfont-0.8.min.js#free'></script> body { margin: 0; padding: 0; } h1 { font-family: "Bebas Neue", Arial; font-size: 40px; color: #99f; } <h1 class="renderedFont">Bebas Neue</h1>

Categories : HTML

Chrome works but on FF, My footer is hidden- padding on bottom not working
Remove bottom: 0 from your footer .footer { bottom: 0; <==// Remove this color: #EDEDED; font-family: 'Roboto',sans-serif; font-size: 0.9em; font-weight: 100; position: absolute; text-align: center; width: 100%; z-index: 1; }

Categories : HTML

JQM Padding With Hidden Elements
http://fiddle.jshell.net/njAt4/ Just wrap the a tag in a div with your delete class, and then it works as you wish. <div class="delete"> <a href="#" data-rel="popup" data-mini="false" data-position-to="window" data-icon="delete"></a> </div> This will remove the delete icon on this node entirely.

Categories : Jquery

Need padding at the bottom of DIV Elements
Simply solution is to put a border on the bottom http://jsfiddle.net/davidja/ZteLW/6/ .notes-note { width: 175px; height: 100px; margin: 5px; background-color: #FFFDD0; overflow: hidden; border-bottom: solid 10px #fffdd0; // Add This } Or as Mr Lister pointed out you could use a transparent border. But you will need to use css box-sizing to position the border inside the box - http://jsfiddle.net/davidja/ZteLW/10/ .notes-note { width: 175px; height: 100px; margin: 5px; background-color: #FFFDD0; overflow: hidden; border-bottom: solid 10px transparent; //add this box-sizing : border-box ; //add this }

Categories : HTML

Remove padding between accordion elements
I'd suggest the following: .x-panel { margin: 0; } JS Fiddle demo, tested only in Chrome 27/Windows XP.

Categories : Javascript

Apply Padding to Elements with Certain Class after

If you need your solution to work for more than two occurences of .specialInstructionsNotes and you want the padding also on the first element if there is no other, then a js-solution would come in handy, even though it's not preferred by you ;) JS $('h1').each(function() { $(this).nextAll('.specialInstructionsNotes:last').addClass('last-note'); }); Then it's easy to tackle the problem in CSS: CSS .specialInstructionsNotes.last-note { padding: 0 0 30px; } See the exemplary Fiddle

Categories : CSS

Unintentional Padding in Text Elements
I am assuming the reason you are using inline styles is because you are doing an email. Try removing the tr heights on those child elements and set the line height for both spans. Here is the updated fiddle: http://jsfiddle.net/EMtxu/2/

Categories : HTML

How do I get the the google chrome chrome.windows.create extension function to work
inline javascript codes are not allowed (by default) in chrome extensions. so you have to change the code like this. <html> <head> </head> <body> </body> <script src="loader.js"></script> loader.js: function load() { chrome.windows.create({ url: 'http://www.google.com', type: 'panel' }); } document.getElementsByTagName( 'body' )[0].onload = function() { load(); }; For more information about content-security policies visit: Content Security Policy (CSP) - Google Chrome

Categories : Google Chrome

list elements padding in iOS sencha touch
You should not be having this problem because sencha adjust the itemdisclosure icon based on text. Anyway, just give width to p tag CSS .description{ font-family:arial; color:black; font-size:20px; width:90%; // reduce as you wish } .code { font-size: 0.75em; color: darkgray; } List code itemTpl : [ '<p class="code ">{DESCRIPTION}</p>', '<div class="description">SKU:{CODE}</div>' ].join(''), Well, you still want inline style itemTpl : [ '<p style="font-family:arial;color:black;font-size:20px; width:90%;">{DESCRIPTION}</p>', '<div style="font-size: 0.75em; color: darkgray">SKU:{CODE}</div>' ].join(''),

Categories : CSS

a href to chrome:// url in a chrome extension how to make it work
You cannot access chrome pages from an extension. However you could get some settings with Chrome APIs Specifically Bookmarks API, Installed extensions API

Categories : Api

html/css, how to make element padding not cover over previous elements?
Add display: inline-block to #pad-me-out so; #pad-me-out{ background: #999; padding:7px 14px; display: inline-block; } Updated to inline-block as suggested by @tomaroo however this might not work in older browsers.

Categories : HTML

click events and css attributes not attaching to divs, possibly because divs are "mostly padding"
Regarding the close button, if you hover "_tlh_dropdown_input_container" in the inspector, you can see that it overlaps the bottom part of the X button. That's why the hover/click event on the X is not caught below the middle of it. Regarding the down arrow, just wrap it with another DIV on which you'll add the events. You can achieve minimal HTML by using a single DIV and adding the arrow to it using CSS :before or :after.

Categories : Javascript

Why do elements jump between ignoring and acknowledging margins based on parents' padding?
This behavior is always a culprit when using floats. Typically, I do not add any "imperceptible" padding because I would expect the browser to round up and add 1px when you may not intend that to be the case. Instead, I avoid margin-bottom at all costs. Margin-left and margin-right do not cause issues. And if margin-top doesn't work, I add padding to the parent div or use some other sort of work around. I know this doesn't give much insight to the inner workings but the strategy described above works like a charm has not yet failed me. Update This behavior is called margin-collapsing and occurs only to top and bottom margins in certain specific cases; it does not affect inline elements. this effect originates from Netscape 3 that used collapsing margins. While counterintutive the specs

Categories : HTML

How to make padding:auto work in CSS?
auto is not a valid value for padding property, the only thing you can do is take out padding: 0; from the * declaration, else simply assign padding to respective property block. If you remove padding: 0; from * {} than browser will apply default styles to your elements which will give you unexpected cross browser positioning offsets by few pixels, so it is better to assign padding: 0; using * and than if you want to override the padding, simply use another rule like .container p { padding: 5px; }

Categories : CSS

How do I work with grids when I need padding and margin?
You should be applying box-sizing, which accounts for padding when computing the width (i.e. 90px + 10px for padding, will apply the padding inwards, rather than creating a total width of 110px. If you want to be extra safe, add this to your reset or normalise stylesheet: * { box-sizing: border-box } For older versions of Safari & Firefox: * { -webkit-box-sizing: border-box; -moz-box-sizing: border-box } Using the wildcard selector allows the box-sizing property to be applied to all elements. I know this is included in some grid systems out there, e.g. Skeleton.

Categories : CSS

Table padding doesn't work in IE
You need to do it this way <div style="padding-left: 300px;"> <table> ... </table> </div> For more read this answer: padding table with css doesn't work on IE

Categories : HTML

Why IE (not Chrome and FF) add attributes to html node?
It looks like you must have some JS/jQuery somewhere altering that node/element differently for IE than it would for the other browsers. Based on the name of the classes it looks like jQuery UI is the culprit and assigns things differently when using IE vs. the other browsers. Essentially IE is just doing what it is instructed to do by jQuery UI.

Categories : Jquery

leading zero / zero padding doesn't work properly
readline() contain newline. Strip newline. readings = ser.readline().rstrip().split(':', 2) >>> '0.00 '.rjust(5, '0') '0.00 ' >>> '0.00 '.rstrip().rjust(5, '0') '00.00'

Categories : Python

Bottom Padding Approach Does not work for Equal Height Div
You are very close, but just have a few little things wrong. You don't need a width for the right column, just the default width:auto. I used the same negative margin and padding trick to make the right column's height the size of the left's height and also to give the right column the illusion of taking up the rest of the space. You also should float the right container and take away the margin. You can remove the clear:both of the left column because it's not used Demo here .leftPart { border: 1px solid blue; width: 200px; height:200px; float:left; background-color: orange; } .rightPart { border: 1px solid orange; background-color: beige; float:left; margin-bottom: -1000px; padding-bottom: 1000px; margin-right: -5000px; padding-right:

Categories : HTML

Dynamically generated html links work in Firefox but does not work in Chrome
Have you ever tried the preventDefault ? You should use preventDefault which is the default behaviour when you click the link. Besides the links should not be inside the div #rContent ? You are using .on so the links should be inside the parent.

Categories : Jquery

Setting style attributes dynamically and consistently between Chrome & FF
The style property names are camel-cased in JavaScript, so: FB.style.borderColor = "#009900"; The DOM 2 specification includes a list of valid style properties, all following the camel-cased naming scheme. There are no references to supporting the CSS property names without transformation. Newer specifications/drafts may have changed this, but I couldn't find a good reference. The links quoo's answer provide indicate that style['border-color'] is in fact a non-standard, developer-friendly alternate access method supported by WebKit and Trident, but not Gecko or Opera.

Categories : Javascript

Padding bytes discovery & common and special compiler behavior on excess elements in array initializer
1) Compiler behavior: What do other compilers do, when I do the thing above? Is it common standard to only show a warning and skip the values which do not fit in? Are there compilers (also considering C++ compilers) which raise an error and do not compile or do anything weired? int array[1]={2,2} This is an invalid declaration. The compiler is required to at least raise a diagnostic and is authorized to stop the compilation. Same for a declaration of an array of zero element.

Categories : C++

centered nav with flexible left and right widths - percentage padding does not work
Edit: Here's a new solution. Hope this looks like expected. ;) HTML <nav> <ul class="left"> <li>Item 1 longer longer</li> <li>Item 2</li> <li>Item 3</li> </ul> <ul class="centered"> <li>Centered</li> </ul> <ul class="right"> <li>Item 4</li> <li>Item 5</li> <li>Item 6</li> </ul> </nav> CSS ul, li { margin: 0; padding: 0; list-style-type: none; } nav { position: relative; min-width: 700px; } nav > ul { width: 100%; background: red; } nav > ul > li { display: inline-block; text-align: center; background: green; color: white;

Categories : HTML

Why does a javascript function work in firefox but not work on Chrome or IE
Probable cause The reason that this doesn't work is that JavaScript is single threaded. The time-consuming function app.timeConsumingFunction() will block the UI from updating in Chrome and IE. The reason for it to work in Firefox is simply because FF has a different implementation that allow UI events to execute in-between so to speak (Canary and I believe Chrome as well has an experimental mode that allow UI updates to be executed on a separate thread). A browser in general cues up different events such as paint events. Then this queue is traversed and executed event by event. However, if a queue-entry is for example executing the context for a time consuming function, the queue won't have a "breathing space" to continue with the other events in that queue. That would be among othe

Categories : Javascript

XSL pass attributes to child elements if child elements do not already have the same attribute
Try this. <!-- root and static content - container --> <xsl:template match="/"> <section> <xsl:apply-templates select='section/container/*' /> </section> </xsl:template> <!-- iteration content - child nodes --> <xsl:template match='*'> <xsl:element name='{name()}'> <xsl:apply-templates select='@*|parent::*/@*' /> </xsl:element> </xsl:template> <!-- iteration content - attributes --> <xsl:template match='@*'> <xsl:attribute name='{name()}'><xsl:value-of select='.' /></xsl:attribute> </xsl:template> On outputting each child node, we iteratively transfer across its attributes and those of the parent. <xsl:apply-templates select='@*|parent::*/

Categories : Xslt

create elements and set attributes
You can simply write $('#myTable').append('<tr><td><input type="text" id="id"></td><td><input type="button" id="btnAdd" onclick="AddRow()" value="addrow"></td></tr>');

Categories : Jquery

Why do my image links not work in chrome, even though they work in IE?
First of all you are using id="right" many times which is incorrect. Also try to use selectors in right way : .latest_work a:hover img{ opacity: 1.0; color: #666; border: 2px solid #ddd; }

Categories : HTML

Perl - XML::LibXML - getting elements that have certain attributes
You were almost there. Just notice that author is not a child of image. Attributes do not have text() children, you can compare their values directly with strings. Also, toString is needed to print the values out instead of references. #!/usr/bin/perl use warnings; use strict; use XML::LibXML; my $parser = XML::LibXML->new(); my $xmldoc = $parser->parse_file('1.xml'); my $width = "145"; my $query = "//book[image/@width = '$width']/author/text()"; foreach my $data ($xmldoc->findnodes($query)) { print "Results: ", $data->toString, " "; }

Categories : Xml

XML Schema for same element name with different attributes and elements
This is not possible this rule is called "Element Declarations Consistent". The Element Declarations Consistent rule for model groups (http://www.w3.org/TR/xmlschema-1/#cos-element-consistent) rules out inconsistent element declarations like the following two conflicting definitions of element , i.e., cannot be both an "int" and a "string" in the same group: (example-1) <xs:complexType name="example-1"> <xs:sequence> <xs:element name="a" type="xs:int"/> <xs:element name="whatever"/> <xs:element name="a" type="xs:string"/> </xs:sequence> </xs:complexType>

Categories : Xslt

Disable all style attributes for all elements
There are two separate things - indent plugin should be able to indet only lists (changing their structure, not adding left margin), not blocks. At this moment one plugin does two jobs, what does not make sense. Patch for this will be released in about a month - https://dev.ckeditor.com/ticket/10027. Although, even now it is possible to configure indent to use classes rather than styles - see the config.indentClasses option.

Categories : Javascript



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