Search Results

Search found 11 results on 1 pages for 'shiv'.

Page 1/1 | 1 

  • Using HTML5 Today part 2–Fixing Semantic tags with a Shiv

    - by Steve Albers
    Semantic elements and the Shiv! This is the second entry in the series of demos from the “Using HTML5 Today” talk. For the definitive discussion on unknown elements and the HTML5 Shiv check out Mark Pilgrim’s Dive Into HTML5 online book at http://diveintohtml5.info/semantics.html#unknown-elements Semantic tags increase the meaning and maintainability of your markup, help make your page more computer-readable, and can even provide opportunities for libraries that are written to automagically enhance content using standard tags like <nav>, <header>,  or <footer>. Legacy IE issues However, new HTML5 tags get mangled in IE browsers prior to version 9.  To see this in action, consider this bit of HTML code which includes the new <article> and <header> elements: Viewing this page using the IE9 developer tools (F12) we see that the browser correctly models the hierarchy of tags listed above: But if we switch to IE8 Browser Mode in developer tools things go bad: Did you know that a closing tag could close itself?? The browser loses the hierarchy & closes all of the new tags.  The new tags become unusable and the page structure falls apart. Additionally block-level elements lose their block status, appearing as inline.    The Fix (good) The block-level issue can be resolved by using CSS styling.  Below we set the article, header, and footer tags as block tags. article, header, footer {display:block;} You can avoid the unknown element issue by creating a version of the element in JavaScript before the actual HTML5 tag appears on the page: <script> document.createElement("article"); document.createElement("header"); document.createElement("footer"); </script> The Fix (better) Rather than adding your own JS you can take advantage of a standard JS library such as Remy Sharp’s HTML5 Shiv at http://code.google.com/p/html5shiv/.  By default the Modernizr library includes HTML5 Shiv, so you don’t need to include the shiv code separately if you are using Modernizr.

    Read the article

  • HTML5 Shiv not parsing quick enough

    - by Mikey Hogarth
    One of our web designers is working on a site at the moment and is using HTML5 elements, which she styles up in older browsers using the well documented Html5Shiv; http://css-tricks.com/html5-innershiv/ She reported some pretty weird behavior today and it looks like this is the cause. Initially it was very confusing, and went something along the lines of; "The page looks fine, I refresh it looks fine, refresh several times and occasionally it will not apply my styles to the HTML5 elements" Current best theory is that the shiv is not kicking in quick enough, and the page loads before the new elements have been registered. I was wondering if anyone could suggest a surefire way of including the shiv and making sure it's loaded and been parsed BEFORE the rest of the elements, so they will definitely get styled. EDIT (more info) Shiv is being included in the head, directly below the title/meta tags; <!--[if IE]> <script type="text/javascript" src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> The bit that is being styled is in the footer and is cross-site. Many of the pages will change in size as they're being powered by a CMS that our marketing team will use so I am unable to give an exact page size. All I would say is that if page size is an issue and there is no workaround, can someone let me know as this will mean we basically can't use HTML5 on this project (or at the very least we'll need to add superflous markup such as divs to ensure that the layout doesn't go crazy) EDIT 2 There is no chance of me posting the code unfortunately - it's only re-creatable under really obscure circumstances and the project is marked "top secret" at the moment :( If nobody knows then I'm guessing it's either a case of "everyone knows it happens but kinda ignores it" or just that it's something else other than the shiv.

    Read the article

  • gtk glade need help

    - by shiv garg
    I am using glade to make an user interface. i have successfully generated the glade file Now i have to include this file in my C code. I am using following code: #include <stdlib.h> #include<gtk/gtk.h> int main (int argc, char *argv[]) { GtkWidget *builder,*window,*button; gtk_init (&argc, &argv); builder=gtk_builder_new(); gtk_builder_add_from_file(builder,"shiv.glade",NULL); window=GTK_WIDGET (gtk_builder_get_object(builder,"window1")) ; button=GTK_WIDGET (gtk_builder_get_object(builder,"button1")); g_object_unref(G_OBJECT(builder)); gtk_widget_show(button); gtk_widget_show(window); gtk_main (); return 0; } My UI is a simple window having a button without any callback function. I am getting following errors on execution GTK-CRITICAL **: IA__gtk_widget_show assertion 'GTK_IS_WIDGET(widget)' failed

    Read the article

  • Windows Virtual PC File Copy from host very slow

    - by Shiv Kumar
    I have a Windows 7 desktop on which I've installed Windows Virtual PC and an instance Windows 7. I also have virtual XP instance on the same host. The problem I am having is that copying files from the host to the virtual machine is dog slow. I'm talking 17KB/sec. The host machine has a gigbit NIC. While using the XP virtual instance to do the same I didn't notice a huge difference but on the Window 7 virtual instance the time is really slowing me down. Is there something I need to do (settings) to fix this? I've attached an image of the Resource monitor (of the virtual Windows 7 instance) that shows my network traffic going in bursts rather than relatively steady. The files are on a "public" folder on my host machine.

    Read the article

  • 450 Error with Postfix

    - by Shiv
    I have setup postfix to send outgoing mail, It works fine for most of the cases except for some e.g duke.alumni.edu where it gives me a 450 error, even though the email address is valid. This is the exact error I get Sender address rejected: Domain not found (in reply to RCPT TO command)) Any suggestions on how I can rectify this?

    Read the article

  • Angularjs: addition of integers even after I parse the variable as integer

    - by Shiv Kumar
    I really have a weird problem in adding two numbers. Here is my code, in the first controller everything is working fine, but in the second controller instead of 0 if I add 10, the output is completely weird Here is html code <div ng-app=""> <div ng-controller="Controller1"> <br/>**** Controller-1 <br/>Add 0 : {{update1(0)}} <br/>Add 10 : {{update1(10)}} <br/>Add 50 : {{update1(50)}} <br/>Add -60 : {{update1(-60)}}</div> <div ng-controller="Controller2"> <br/>**** Controller-2 <br/>Add 10 : {{update2(10)}} <br/>Add 10 : {{update2(10)}} <br/>Add 50 : {{update2(50)}} <br/>Add -60 : {{update2(-60)}}</div> </div> Here is my javascript function Controller1($scope) { var x = 0; $scope.update1 = function (smValue) { x += parseInt(smValue); return x; } } function Controller2($scope) { var y = 0; $scope.update2 = function (smValue) { y += parseInt(smValue); return y; } } and here is the output **** Controller-1 Add 0 : 0 Add 10 : 10 Add 50 : 60 Add -60 : 0 **** Controller-2 Add 0 : 110 Add 10 : 120 Add 50 : 170 Add -60 : 110 here is the link to try: http://jsfiddle.net/6VqqN/ can anyone please explain me why it is behaving like that. Even if I add a 3or4 digit number, output is completely different then what I expected.

    Read the article

  • How to Configure all MachineToApplication settings in your application's root?

    - by Shiv
    Default allowDefinition='MachineToApplication' I have been looking around on different sites and fora, and i have a similar problem than some people had before... it is an error to use a section registered as allowDefinition='MachineToApplicat How to use this solution: Configure all MachineToApplication settings in your application's root, and remove all MachineToApplication settings from your application's subdirectories.

    Read the article

  • how to show image from ms access to jpanel in java netbeans

    - by Shiv
    I have used this code : private void okActionPerformed(java.awt.event.ActionEvent evt) { try { String Update = name.getText(); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection connection = DriverManager.getConnection("jdbc:odbc:NewPData"); PreparedStatement psmnt = connection.prepareStatement("SELECT Image FROM Table1 where Name='" + Update + "'"); ResultSet rs = psmnt.executeQuery(); Blob blob = rs.getBlob("Image"); int b; InputStream bis = rs.getBinaryStream("Image"); FileOutputStream f = new FileOutputStream("Image.jpg"); while ((b = bis.read()) >= 0) { f.write(b); } f.close(); bis.close(); icon = new ImageIcon(blob.getBytes(1L, (int) blob.length())); lblImage.setIcon(icon); } catch (ClassNotFoundException e) { e.printStackTrace(); } catch (Exception e) { e.printStackTrace(); } } Exception it show is java.lang.UnsupportedOperationException i have stored image first in ms access and now i want to show it on a label plz help

    Read the article

  • Are there any adverse side effects to loading html5shiv in every browser?

    - by Jeff
    On the html5shiv Google Code page the example usage includes an IE conditional: <!--[if lt IE 9]> <script src="dist/html5shiv.js"></script> <![endif]--> However on the html5shiv github page, the description explains: This script is the defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer, as well as default HTML5 styling in Internet Explorer 6 - 9, Safari 4.x (and iPhone 3.x), and Firefox 3.x. An obvious contradiction. So to satisfy my curiosity, for anyone who has studied the code, are there any adverse side affects to loading html5shiv in every browser (without the IE conditional)? EDIT: My goal, obviously, is to use the shiv without the IE conditional.

    Read the article

  • Apache complex regex crashing with 500 error

    - by digitalspaghetti
    I have been working with an existing website out company has running until I finish developing the new site. I've been asked to add some additional functionality to booking pages that will automatically set a booking button based on passed parameters. The existing working regex is as follows: RewriteRule ^.+-(\d+)\.accommodation$ property_detail.php?id=$1 Which works fine with the url like below and passes through the URL. this-is-the-property-name.1234.accomodation However as a quick shiv, I am trying to do the following: this-is-the-property-name.1234.accomodation?override=true&start_date=2010-05-14&numbernights=2&sleeps=10&price=1012 The regex I came up with for this was: RewriteRule ^.+-(\d+)\.accommodation\?override=(\w+)&start_date=(19|20)[0-9]{2}[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])&numbernights=(\d+)&sleeps=(\d+)&price=(\d+)$ property_detail.php?id=$1&override=$2&start_date=$3-$4-$5&numbernights=$6&sleeps=$7&price=$8 The regex is passing as valid in RegexBuddy - however it keeps causing a 500 error on the server. Can anyone help me get my head around this one?

    Read the article

1