Search Results

Search found 245 results on 10 pages for 'stylesheets'.

Page 8/10 | < Previous Page | 4 5 6 7 8 9 10  | Next Page >

  • Selenium Webdrivers: Load Page without any resources

    - by Biffy
    I am trying to prevent Javascript from changing the site's source code I'm testing with Selenium. The problem is, I can't just simply turn Javascript off in the Webdriver, because I need it for a test. Here's what I'm doing for the Firefox Webdriver: firefoxProfile.setPreference("permissions.default.image", 2); firefoxProfile.setPreference("permissions.default.script", 2); firefoxProfile.setPreference("permissions.default.stylesheet", 2); firefoxProfile.setPreference("permissions.default.subdocument", 2); I don't allow Firefox to load any Images, Scripts and Stylesheets. How can I do this with the Internet Explorer Webdriver and the Chrome Webdriver? I have not found any similar preferences. Or is there even a more elegant way to stop the webdrivers from loading the site's JS Files after all? Thank you!

    Read the article

  • Agile web development with Rails 4 interface difficulties

    - by Luke Annison
    I've been following along with the examples in the book in making a online catalog and am having a couple of discouraging difficulties in Chapter 8 task C: Catalog display. I have input the code for the stylesheets as instructed but it has created a slightly skewed result as compared to what is shown in the book. Whilst minor and aesthetic in nature its a little shock to my confidence and slightly irritating when trying to carry on through the book. I have too little rep to post a pic, but heres the link: http://s11.postimage.org/3pwlzfiwj/Screen_Shot_2012_10_08_at_22_29_56.png) As you can see the boarder seems a little confused and the image at the top is covering the header text. I've been through the code time and time again but can't seem find out where I've gone wrong. Could anybody give me some clues?

    Read the article

  • How to best work with a "forked" a git repo, and push some new features back to origin

    - by Jesper Blad Jensen aka. Deldy
    Hi all, I'm having a blog-project on GibHub, where a friend of mine, wants to base his code on. He will make some changes to some files that he do not wish to commit back to me (maybe stylesheets and images), but he will maybe implement a new feature that he would like to push back to my project. He should also be able to get new code from me, where he would like to get all new stuff. I've looked around, and it seams that Rebase is the way to go for him, to get updates from me, but how can he most easily push a feature back to me? (He is just learning Git, as well as me)

    Read the article

  • How to detect mobile and tablet using CSS or JavaScript regardless of brands?

    - by user144966
    Basically what I'm trying to do is have 3 css stylesheets for desktop, mobile, and tablet. And I don't care if it is ipad or samsung galaxy tab as long as I know it is a tablet, so that I just apply tablet css to it. Same as iphone or Nexus which I don't care either. I just care about the dimension basically. That would be good if JQuery Mobile could do this. I know there is lots of code for detecting iphone, ipad, and etc, hope my post still makes sense. Thanks.

    Read the article

  • Creating a bare bone web-browser: After the html parser, javascript parser, etc have done their work, how do I display the content of the webpage?

    - by aste123
    This is a personal project to learn computer programming. I took a look at this: https://www.udacity.com/course/viewer#!/c-cs262 The following is the approach taken in it: Abstract Syntax Tree is created. But javascript is still not completely broken down in order not to confuse with the html tags. Then the javascript interpreter is called on it. Javascript interpreter stores the text from the write() and document.write() to be used later. Then a graphics library in Python is called which will convert everything to a pdf file and then we convert it into png or jpeg and then display it. My Question: I want to display the actual text in a window (which I will design later) like firefox or chrome does instead of image files so that the data can be selected, copied, etc by the user of the browser. How do I accomplish this? In other words, what are the other elements of a bare bone web browser that I am missing? I would prefer to implement most of the stuff in C++ although if things seem too complicated I might go with Python to save time and create a prototype and later creating another bare bone browser in C++ and add more features. This is a project to learn more. I do realize we already have lots of reliable browsers like firefox, etc. The way I feel it is done: I think after all the broken down contents have been created by the parsers and interpreters, I will need to access them individually from within the window's code (like qt) and then decide upon a good way to display them. I am not sure if it is the way this should be done. Additions after useful comment by Kilian Foth: I found this page: http://friendlybit.com/css/rendering-a-web-page-step-by-step/ 14. A DOM tree is built out of the broken HTML 15. New requests are made to the server for each new resource that is found in the HTML source (typically images, style sheets, and JavaScript files). Go back to step 3 and repeat for each resource. 16. Stylesheets are parsed, and the rendering information in each gets attached to the matching node in the DOM tree 17. Javascript is parsed and executed, and DOM nodes are moved and style information is updated accordingly 18. The browser renders the page on the screen according to the DOM tree and the style information for each node 19. You see the page on the screen I need help with step 18. How do I do that? How much work do Webkit and Gecko do? I want to use a readymade layout renderer for step number 18 and not for anything that comes before that.

    Read the article

  • ASP.NET MVC 4: Short syntax for script and style bundling

    - by DigiMortal
    ASP.NET MVC 4 introduces new methods for style and scripts bundling. I found something brilliant there I want to introduce you. In this posting I will show you how easy it is to include whole folder with stylesheets or JavaScripts to your page. I’m using ASP.NET MVC 4 Internet Site template for this example. When we open layout pages located in shared views folder we can see something like this in layout file header: <link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/css")" rel="stylesheet" type="text/css" />    <link href="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Content/themes/base/css")" rel="stylesheet" type="text/css" />    <script src="@System.Web.Optimization.BundleTable.Bundles.ResolveBundleUrl("~/Scripts/js")"></script> Let’s take the last line and modify it so it looks like this: <script src="/Scripts/js"></script> After saving the layout page let’s run browser and see what is coming in over network. As you can see the request to folder ended up with result code 200 which means that request was successful. 327.2KB was received and it is not mark-up size for error page or directory index. Here is the body of response: I scrolled down to point where one script ends and another one starts when I made the screenshot above. All scripts delivered with ASP.NET MVC project templates start with this green note. So now we can be sure that the request to scripts folder ended up with bundled script and not with something else. Conclusion Script and styles bundling uses currently by default long syntax where bundling is done through Bundling class. We can still avoid those long lines and use extremely short syntax for script and styles bundling – we just write usual script or link tag and give folder URL as source. ASP.NET MVC 4 is smart enough to combine styles or scripts when request like this comes in.

    Read the article

  • Fluid VS Responsive Website Development Questions

    - by Aditya P
    As I understand these form the basis for targeting a wide array of devices based on the browser size, given it would be a time consuming to generate different layouts targeting different/specific devices and their resolutions. Questions: Firstly right to the jargon, is there any actual difference between the two or do they mean the same? Is it safe to classify the current development mainly a html5/css3 based one? What popular frameworks are available to easily implement this? What testing methods used in this regard? What are the most common compatibility issues in terms of different browser types? I understand there are methods like this http://css-tricks.com/resolution-specific-stylesheets/ which does this come under?. Are there any external browser detection methods besides the API calls specific to the browser that are employed in this regard? Points of interest [Prior Research before asking these questions] Why shouldn't "responsive" web design be a consideration? Responsive Web Design Tips, Best Practices and Dynamic Image Scaling Techniques A recent list of tutorials 30 Responsive Web Design and Development Tutorials by Eric Shafer on May 14, 2012 Update Ive been reading that the basic point of designing content for different layouts to facilitate a responsive web design is to present the most relevant information. now obviously between the smallest screen width and the highest we are missing out on design elements. I gather from here http://flashsolver.com/2012/03/24/5-top-commercial-responsive-web-designs/ The top of the line design layouts (widths) are desktop layout (980px) tablet layout (768px) smartphone layout – landscape (480px) smartphone layout – portrait (320px) Also we have a popular responsive website testing site http://resizemybrowser.com/ which lists different screen resolutions. I've also come across this while trying to find out the optimal highest layout size to account for http://stackoverflow.com/questions/10538599/default-web-page-width-1024px-or-980px which brings to light seemingly that 1366x768 is a popular web resolution. Is it safe to assume that just accounting for proper scaling from width 980px onwards to the maximum size would be sufficient to accommodate this? given we aren't presenting any new information for the new size. Does it make sense to have additional information ( which conflicts with purpose of responsive web design) to utilize the top size and beyond?

    Read the article

  • What is a resonable workflow for designing webapps?

    - by Evan Plaice
    It has been a while since I have done any substantial web development and I'd like to take advantage of the latest practices but I'm struggling to visualize the workflow to incorporate everything. Here's what I'm looking to use: CakePHP framework jsmin (JavaScript Minify) SASS (Synctactically Awesome StyleSheets) Git CakePHP: Pretty self explanatory, make modifications and update the source. jsmin: When you modify a script, do you manually run jsmin to output the new minified code, or would it be better to run a pre-commit hook that automatically generates jsmin outputs of javascript files that have changed. Assume that I have no knowledge of implementing commit hooks. SASS: I really like what SASS has to offer but I'm also aware that SASS code isn't supported by browsers by default so, at some point, the SASS code needs to be transformed to normal CSS. At what point in the workflow is this done. Git I'm terrified to admit it but, the last time I did any substantial web development, I didn't use SCM source control (IE, I did use source control but it consisted of a very detailed change log with backups). I have since had plenty of experience using Git (as well as mercurial and SVN) for desktop development but I'm wondering how to best implement it for web development). Is it common practice to implement a remote repository on the web host so I can push the changes directly to the production server, or is there some cross platform (windows/linux) tool that makes it easy to upload only changed files to the production server. Are there web hosting companies that make it eas to implement a remote repository, do I need SSH access, etc... I know how to accomplish this on my own testing server with a remote repository with a separate remote tracking branch already but I've never done it on a remote production web hosting server before so I'm not aware of the options yet. Extra: I was considering implementing a javascript framework where separate javascript files used on a page are compiled into a single file for each page on the production server to limit the number of file downloads needed per page. Does something like this already exist? Is there already an open source project out in the wild that implements something similar that I could use and contribute to? Considering how paranoid web devs are about performance (and the fact that the number of file requests on a website is a big hit to performance) I'm guessing that there is some wizard hacker on the net who has already addressed this issue.

    Read the article

  • .htaccess Permission denied. Unable to check htaccess file

    - by Josh
    I have a strange problem when adding a sub-domain to our virtual server. I have done similar sub-domains before and they have worked fine. When I try to access the sub-domain I get an 403 Forbidden error. I checked the error logs and have the following error: pcfg_openfile: unable to check htaccess file, ensure it is readable I've searched Google and could only find solutions regarding file and folder permissions, that I have checked and the solution isn't solved. I also saw problems with Frontpage Extensions, but that's not installed on the server. Edit Forgot to say that there isn't a .htaccess file in the directory of the sub-domain Edit #2 Still not been able to find a solution on this. Only things I have been able to find out is: It doesn't seem to be a problem with any .htaccess files (I've tried creating blank ones, with correct user privileges). It doesn't seem to be a problem with any folder permissions as they are all set correct. There isn't a problem with the way the sub-domain has been set up, as I've tried pointing the DocumentRoot to another folder and it worked fine. I've also done sub-domains fine before with no problem. Edit #3 Find out more information. I don't think it can be a file permission problem now, because if I access it by going to the server ip and then the directory where the site is hosted it all works fine (minus the stylesheets & images, which is just down to how they are linked)

    Read the article

  • wget mirroring, subdomains and directories and cookies

    - by Jimmu
    Hi all, I have an account on a web page that is now "full" (ie I have used up all my allocated space) and I would like to make a mirror of that site. wget seems like the thing to use. The problem is that I would only like to mirror the sites the lie within this directory http://user.domain.com/room/2324343/transcript/ (and sub-directories). Whilst saving the correct stylesheets, javascripts and css etc which exist in different directories. There as also uploaded files that are linked to within the pages in the transcript directory (on different directories) that I would like to download/mirror (theses are in a variatey of formats .exe, .py, .png, .app (and many more)). There are also images that are on different severs that are on these pages. Also I would like it if the links (which are sometimes relative , sometimes absoulute (but to internal things), sometimes external ) worked correctly so that if they link to things that have been downloaded(mirrored) they work fine (without internet connection), but if they link to things that are external or havent been mirrored they link to the external site. Basically so they work as expected. Another problem is that you have to log in to acess the site. Can wget be used to acomplish this or is there a better way? either way how do I achive this? (I have asked this question at stackoverflow.com/questions/2190115/wget-mirroring-subdomains-and-directories-and-cookies but it was recommended that I try asking it here)

    Read the article

  • Microsoft Application Request Routing with Windows Authentication

    - by theplatz
    I'm running into a problem trying to get Windows Authentication working in an environment that uses Microsoft Application Request Routing and was hoping someone might be able to help. The problem I'm running into is that only some requests are authenticated, while others fail with 401 errors. I have followed the Special Case of Running IIS 7.0 in a Web Farm instructions found at http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-principal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx to no avail. My current server setup looks like the following: ARR Two servers set up with IIS shared configuration using IIS 7.5 on Windows 2008 R2 Anonymous authentication turned on for the Default Web Site Web Farm Two servers running IIS 7.5 on Windows 2008 R2 Three web sites set up using port binding to differentiate between virtual hosts. Ports being used are 8000, 8001, and 8002 Application pools for Windows Authentication all use a common domain account SPN added to domain account for http/<virthalhost-name>:<port-number> and http/<virtualhost-name>.<fully-qualified-domain>:<port-number> The IIS logs show the following when authentication is working/failing. If I understand correctly, all requests should show DOMAIN\User_Name: 2012-11-19 15:03:17 CLUSTER-IP-ADDRESS GET /home/stylesheets/techweb.landing.css - 8002 DOMAIN\User_Name ARR-HOST-1-IP-ADDRESS 200 0 0 62 2012-11-19 15:03:17 CLUSTER-IP-ADDRESS GET /home/images/user-background-right.gif - 8002 - ARR-HOST-1-IP-ADDRESS 401 2 5 0 2012-11-19 15:03:17 CLUSTER-IP-ADDRESS GET /home/images/user-background-left.gif - 8002 DOMAIN\User_Name ARR-HOST-IP-ADDRESS 200 0 0 31 2012-11-19 15:03:17 CLUSTER-IP-ADDRESS GET /home/images/user-icon.png - 8002 - ARR-HOST-1-IP-ADDRESS 401 2 5 0 2012-11-19 15:03:17 CLUSTER-IP-ADDRESS GET /home/images/user-icon.png - 8002 - ARR-HOST-1-IP-ADDRESS 401 1 2148074248 0 2012-11-19 15:03:17 CLUSTER-IP-ADDRESS GET /home/images/application-icon.png - 8002 - ARR-HOST-1-IP-ADDRESS 401 1 2148074248 0 2012-11-19 15:03:17 CLUSTER-IP-ADDRESS GET /home/images/user-background-right.gif - 8002 - ARR-HOST-1-IP-ADDRESS 401 1 3221225581 15 2012-11-19 15:03:17 CLUSTER-IP-ADDRESS GET /home/images/building.gif - 8002 DOMAIN\User_Name ARR-HOST-2-IP-ADDRESS 200 0 0 218 Does anyone know what might cause this problem and how I can resolve it?

    Read the article

  • Firefox takes a really long time to load some sites on Ubuntu

    - by Dave
    Hello guys, I have an issue here. Some sites - just a few - takes a really long time to load on Firefox. One example is A List Apart (http://www.alistapart.com/) which takes more than 30 minutes (yes, minutes, not seconds). On Opera, ou even through a telnet session, the problematic sites run without problem, fast as expected. I am using Linux 8.04, running Firefox 3.6.3 downloaded from mozilla site, with a 10M ADSL connection. I tried many tweaks I found googling, like disable IPv6, and change http pipelining settings on FF's about:config. None worked. I also used Firebug to find what phase during negotiation is the bottleneck. Findings are in the screenshot. Well guys, any idea what is the issue? And how to solve it? I repeat, this only happens with firefox (3.6.3 and prior versions), for a few sites only (even sites with much more requests, images, javascripts, stylesheets work fine), and http pipelines and IPv6 tweaks on about:config didn't work. Thanks

    Read the article

  • jQuery DataTables is messing op my CSS grids in IE8, how to fix?

    - by Brendan Vogt
    I am using ASP.NET MVC3 with the jQuery Datatable plug in. I am having an issues with my CSS layout when the datatable is on a page. If there is no datatable then everything displays fine. When the datatable is on the screen then it overlaps the footer of my website. I can't seem to get this to display correctly. I have a grid layout using the YUI3, and this is what I all use from YUI3 (in this order): cssreset-min cssfonts-min cssgrids-min cssbase-min This works fine in the latest version of FireFox. I am only testing on IE8, this is a requirement and most of the people at my work uses IE8. I have minified my HTML so that only the bare minimum is available. This is my HTML: <!DOCTYPE html> <html> <head> <title>My Website</title> <meta charset="utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <link href="/Assets/Stylesheets/hef2.css" rel="stylesheet" /> <link href="/Assets/Stylesheets/jQuery-DataTables/css/jquery.dataTables.css" rel="stylesheet" /> </head> <body> <div id="hd">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</div> <div id="bd"> <div class="yui3-g"> <div class="yui3-u" id="nav"> <div id="nav-container"> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p> </div> </div> </div> <div class="yui3-u" id="main"> <div id="main-container"> <div class="content"> <h1>Banks Dashboard</h1> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p> </div> <div class="content"> <div id="banks-datatable-wrapper"> <div id="banks-datatable-container"></div> <div style="clear:both;"></div> </div> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p> </div> <div class="content"> <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</p> </div> </div> </div> </div> </div> <div id="ft">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas sit amet metus. Nunc quam elit, posuere nec, auctor in, rhoncus quis, dui. Aliquam erat volutpat. Ut dignissim, massa sit amet dignissim cursus, quam lacus feugiat.</div> <script src="/Assets/JavaScripts/jQuery/jquery-1.7.2.min.js"></script> <script src="/Assets/JavaScripts/jQuery-DataTables/jquery.dataTables.min.js"></script> <script type="text/javascript"> $(document).ready(function () { $('#banks-datatable-container').html('<table class="display" id="banks-datatable"></table>'); $('#banks-datatable').dataTable({ "aoColumns": [ { "sTitle": "Engine" }, { "sTitle": "Browser" }, { "sTitle": "Platform" }, { "sTitle": "Version", "sClass": "center" }, { "sTitle": "Grade" } ], "bAutoWidth": false, "bFilter": false, "bLengthChange": false, "bProcessing": true, //"bServerSide": true, "bSort": false, "iDisplayLength": 11, "sAjaxSource": '/Administration/Bank/List2' }); }); </script> </body> </html> This is the only CSS that I currently use together with the CSS of YUI3: body { margin: auto; width: 1025px; } #nav { width: 300px; } #main { width: 725px; } Can someone please help me get this sorted out? I have tried tried adding clear:both but it didn't work. Is the an online service like jsbin where I can paste/upload my HTML/CSS code/files? Code can viewed at: http://live.datatables.net/efosuj/3/edit. It displays correctly in the available viewer but when run separate in IE8 then it gives issues. UPDATE 2012-06-12 I managed to add the following and it works, but I would like to add it in a style, tried it but it didn't work: if (navigator.userAgent.toString().indexOf('MSIE') >= 0) { jQuery('#main-container').css('overflow', 'auto'); } This was added after the grid was loaded. Is this the only way to do this?

    Read the article

  • Writing an unthemed view while still using Orchard shapes and helpers

    - by Bertrand Le Roy
    This quick tip will show how you can write a custom view for a custom controller action in Orchard that does not use the current theme, but that still retains the ability to use shapes, as well as zones, Script and Style helpers. The controller action, first, needs to opt out of theming: [Themed(false)] public ActionResult Index() {} .csharpcode, .csharpcode pre { font-size: small; color: black; font-family: consolas, "Courier New", courier, monospace; background-color: #ffffff; /*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt { background-color: #f4f4f4; width: 100%; margin: 0em; } .csharpcode .lnum { color: #606060; } Then, we still want to use a shape as the view model, because Clay is so awesome: private readonly dynamic _shapeFactory; public MyController(IShapeFactory shapeFactory) { _shapeFactory = shapeFactory; } [Themed(false)] public ActionResult Index() { return View(_shapeFactory.MyShapeName( Foo: 42, Bar: "baz" )); } As you can see, we injected a shape factory, and that enables us to build our shape from our action and inject that into the view as the model. Finally, in the view (that would in Views/MyController/Index.cshtml here), just use helpers as usual. The only gotcha is that you need to use “Layout” in order to declare zones, and that two of those zones, Head and Tail, are mandatory for the top and bottom scripts and stylesheets to be injected properly. Names are important here. @{ Style.Include("somestylesheet.css"); Script.Require("jQuery"); Script.Include("somescript.js"); using(Script.Foot()) { <script type="text/javascript"> $(function () { // Do stuff }) </script> } } <!DOCTYPE html> <html> <head> <title>My unthemed page</title> @Display(Layout.Head) </head> <body> <h1>My unthemed page</h1> <div>@Model.Foo is the answer.</div> </body> @Display(Layout.Tail) </html> Note that if you define your own zones using @Display(Layout.SomeZone) in your view, you can perfectly well send additional shapes to them from your controller action, if you injected an instance of IWorkContextAccessor: _workContextAccessor.GetContext().Layout .SomeZone.Add(_shapeFactory.SomeOtherShape()); Of course, you’ll need to write a SomeOtherShape.cshtml template for that shape but I think this is pretty neat.

    Read the article

  • Correct way to import Blueprint's ie.css via DotLess in a Spark view

    - by Chris F
    I am using the Spark View Engine for ASP.NET MVC2 and trying to use Blueprint CSS. The quick guide to Blueprint says to add links to the css files like so: <link rel="stylesheet" href="blueprint/screen.css" type="text/css" media="screen, projection"> <link rel="stylesheet" href="blueprint/print.css" type="text/css" media="print"> <!--[if lt IE 8]><link rel="stylesheet" href="blueprint/ie.css" type="text/css" media="screen, projection"><![endif]--> But I'm using DotLess and wish to simplify Blueprint as suggested here. So I'm doing this in my site.less (which gets compiled to site.min.css by Chirpy): @import "screen.css"; #header { #title { .span-10; .column; } } ... Now my site can just reference site.min.css and it includes blueprint's screen.css, which includes my reset. I can also tack on an @import "print.css" after my @import "screen.css" if desired. But now, I'm trying to figure out the best way to bring in the ie.css file to have Blueprint render correctly in IE6 & IE7. In my Spark setup, I have a partial called _Styles.spark that is brought into the Application.spark and is passed a view model that includes the filenames for all stylesheets to include (and an HtmlExtension to get the full path) and they're added using an "each" iterator. <link each="var styleSheet in Model.Styles" href="${Html.Stylesheet(styleSheet)}" rel="stylesheet" type="text/css" media="all"/> Should I simply put this below the above line in my _Styles.spark file? <!--[if lt IE 8]><link rel="stylesheet" href="${Html.Stylesheet("ie.css")}" type="text/css" media="screen, projection"><![endif]--> Will Spark even process it because it's surrounded by a comment?

    Read the article

  • Two Linked CSS Files Not working

    - by Oscar Godson
    <head> <title>Water Bureau</title> <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" href="/css/main.css" type="text/css" media="screen" title="Main CSS"> <link rel="stylesheet" href="custom.css" type="text/css" media="screen" title="Custom Styles"> <script language="JavaScript" src="/shared/js/createWin.js" type="text/javascript"></script> </head> Thats the code, but the "custom.css" isn't working. It doesn't work at all. If we add a @import into main.css OR into the header instead of a it works fine though. Any ideas? We also got rid of the media="screens" on both as well. The CSS inside of it is working fine, it's just when we stack those two, the first one parsed is the only one read by the browser. So if we swap main below custom, custom than works but NONE of main works. and custom just has snippet of CSS, and doesn't override all the CSS in main, just 1 element. I can't figure it out! We have other ed stylesheets in the head (which we took out for trying to fix this) and they worked fine...

    Read the article

  • AjaxControlToolkit TabContainer with weird rendering behavior

    - by sohum
    I've built a web application that contains a page that uses the AjaxControlToolkit's TabContainer/TabPanel objects. I've developed a custom stylesheet, as well. I'm developing using Visual Studio 2010. The following is the behavior of my application: VS2010 Development Server (localhost:XXXXX): Works as expected with the custom stylesheet. Local IIS: The TabContainer rendered but the stylesheet wasn't applied. I fixed this by doing a CTRL+F5. It seems that IIS caches stylesheets pretty aggressively. Remote Server: The TabContainer and TabPanel are completely hidden. Looking at the HTML, all of them have their visibility set to hidden. The way I got my files onto my remote server were as follows (I haven't yet set up WebDAV or remote publishing because the server is a Windows 7 box and as far as I am aware does not support FrontPage Extensions): The entire solution is under source code control (SVN). Checked in all pending changes (including projects, aspx files, css, AjaxControlToolkit binaries) Synced on the server. Rebuilt everything on server. Deployed to local IIS on server (which is externally accessible). Both on the local IIS on the server and the development server on the server, the TabContainers are completely hidden. Looking at the SVN status on the server project, only the "AjaxControlToolkit.dll" is under source-code control. All the locale-specific DLLs are not on the server. Could this be a potential issue? I'm not sure what's going on and would appreciate any help. Thanks!

    Read the article

  • drupal_add_css not working

    - by hfidgen
    Hiya, I need to use drupal_add_css to call stylesheets onto single D6 pages. I don't want to edit the main theme stylesheet as there will be a set of individual pages which all need completely new styles - the main sheet would be massive if i put it all in there. My solution was to edit the page in PHP editor mode and do this: <?php drupal_add_css("/styles/file1.css", "theme"); ?> <div id="newPageContent">stuff here in html</div> But when i view source, there is nothing there! Not even a broken css link or anything, it's just refusing to add the css sheet to the css package put into the page head. Variations don't seem to work either: drupal_add_css($path = '/styles/file1.css', $type = 'module', $media = 'all', $preprocess = TRUE) My template header looks like this, i've not changed anything from the default other than adding a custom JS. <head> <?php print $head ?> <title><?php print $head_title ?></title> <?php print $styles ?> <?php print $scripts ?> <script type="text/javascript" src="<?php print base_path() ?>misc/askme.js"></script> <!--[if lt IE 7]> <?php print phptemplate_get_ie_styles(); ?> <![endif]--> </head> Can anyone think of a reason why this function is not working? Thanks!

    Read the article

  • QT: I've inherited from QTreeView. I've inherited from QStandardItem. How do i Style the items?

    - by San Jacinto
    My Google skills must be failing me today. I've inherited from QTreeView to create a TreeView that stores a QStandardItemModel instead of a QAbstractItemModel. I have also inherited from QStandardItem to create a class to store my data in an item as is necessary. I've successfully inserted my derived QStandardItem into my derived QTreeView's QStandardItemModel. Now the trouble is, I can't figure out how to style it. I know that QTreeView has a setStyleSheet(QString) member, but I can't seem to get it working. It may be as simple as I'm not styling the correct attribute. Any pointers would be appreciated. Thanks. For clarity, here are my class defs. class SurveyTreeItem : public QStandardItem { public: SurveyTreeItem(); SurveyTreeItem( const QString & text ); ~SurveyTreeItem(); }; class StandardItemModelTreeView : public QTreeView { public: StandardItemModelTreeView(QWidget* parent = 0); ~StandardItemModelTreeView(); QStandardItemModel* getStandardItemModel(); }; I've tried the following StyleSheets: StandardTreeView::Item { font: 87 12pt 'Arial Black'; } StandardTreeView::QStandardItem { font: 87 12pt 'Arial Black'; } QTreeView::QStandardItem { font: 87 12pt 'Arial Black'; } QTreeView::Item { font: 87 12pt 'Arial Black'; } QTreeView::SurveyTreeItem { font: 87 12pt 'Arial Black'; } StandardTreeView::SurveyTreeItem { font: 87 12pt 'Arial Black'; }

    Read the article

  • HttpServerUtility.UrlTokenDecode fails "sometimes" (Invalid length for a Base-64 char array.)

    - by Josef
    We have an IHttpHandler for stylesheets and add a <link/> tag to the page like this: HtmlGenericControl link = new HtmlGenericControl("link"); link.Attributes.Add("rel", "stylesheet"); link.Attributes.Add("href", "stylesheet.axd?d=" + HttpServerUtility.UrlTokenEncode(token)); head.Controls.Add(link); In the stylesheet.axd handler, we UrlTokenDecode the d query string parameter like this: var token = HttpServerUtility.UrlTokenDecode(Request.QueryString["d"]); This works most of the time but every now and then we find one of the following two exceptions in our log: [FormatException: Invalid character in a Base-64 string.] System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32 length) System.Web.HttpServerUtility.UrlTokenDecode(String input) ... [FormatException: Invalid length for a Base-64 char array.] System.Convert.FromBase64CharArray(Char[] inArray, Int32 offset, Int32 length) System.Web.HttpServerUtility.UrlTokenDecode(String input) System.Web.HttpServerUtilityWrapper.UrlTokenDecode(String input) ... Any ideas what would cause this phenomenon? Remarks: the resulting URL is < 1500, so below any known URL limits (e.g. IE: 2083) seems to be independent of user agent (we have these exceptions for IE6,7,8, FF & Chrome) our (unconfirmed) suspicions include AntiVirus products, HTTP proxies, browser addons found this remotely related question, but it's about a viewstate issue

    Read the article

  • ASP.NET MVC on Cassini: How can I force the "content" directory to return 304s instead of 200s?

    - by Portman
    Scenario: I have an ASP.NET MVC application developed in Visual Studio 2008. There is a root folder named "Content" that stores images and stylesheets. When I run locally (using Cassini) and browse my application, every resource from the "Content" directory is always downloaded. Using Firebug, I can verify that the web server returns an HTTP 200 ("ok"). Desired: I would like for Cassini to return HTTP 304 ("not modified") instead of 200. This is the behavior when running the site under IIS7. Reasoning: The site I am working on has a large number of static resources (often as many as 40 per page). Browsing the site is very fast on IIS7, because these resources are (correctly) cached by the browser. However, browsing the site on my local machine is painfully slow. Pages that render in under 1 second on IIS7 take over 30 seconds to render on Cassini. It's actually faster for me to upload the entire website every few minutes and test from there. (Yes, I recognize that this is perverse and crazy.) So: how can I instruct/trick Cassini into treating the "Content" directory like IIS7 does?

    Read the article

  • My Rails app is returning HTTP 500 for all its URLs, but nothing shows up in the log file. How can I

    - by mipadi
    I have a Rails app that is running on a production server with Apache and Phusion Passenger. The app works fine locally when using Mongrel, but whenever I try to load a URL on the production server, it returns HTTP 500. I know the server is working properly, because I can get the static elements of the application (e.g., JavaScript files, stylesheets, images) just fine. I've also checked the Passenger status and it is loading the app (it must be, since the app's 500 Internal Server Error page is returned, not just the default Apache one). Also, when I load the app via script/console production and do something like app.get("/"), 500 is also returned. The problem is that there is nothing in the log files to indicate the problem. production.log is empty. The Apache error logs show no problems with Apache, either. I'm stumped as to what's going on and I'm not sure how to diagnose the problem. I know I may have been a bit vague, but can anyone give a suggestion on what the problem may be? Or at least a way I can go about diagnosing it?

    Read the article

  • Server.Execute(path).. executed page returns the calling pages' url from request.url..

    - by ClarkeyBoy
    Hey, As explained in the title, I am having a problem with getting the URL of the page being executed from within a page. Basically I have a dynamic catalogue, where customers select products they are interested in. The manager of the company I am doing this for would like to be able to create an up to date offline catalogue at any given time, to send out to customers who dont have an internet connection. So far its going really well. I am using Server.Execute to get the content for each page, then putting it in static html pages and changing the dynamic links to static html links (ie changing all aspx links to htm). I am able to output all the pages for about us, contact us, home, and the entire catalogue. However, one of the stylesheets which is included in the page based on the URL (if the page is in the administration section then it is not included, otherwise it is) is not being included in the pages when it should be. I have tried outputting the URL but it just returns the URL of the calling page, not the page being called. Does anyone have any idea why this is happening? Any help would be greatly appreciated. Regards, Richard Clarke

    Read the article

  • web development using google sites

    - by CHID
    Hi, I have hosted a website. But now my client asks to change it to http://sites.google.com. They hav registered their domain in google. I logged in the site and saw the procedures to create a website from scratch. But is there any way to directly replace the site into google sites. Like, in my site i hav included css files in a folder called stylesheets/css and access it through the link tag. And there are several folders lik that, viz images, scripts etc. 1.Now if i have to transfer it to google sites, where do i create the folders and stuff. I have the priviliges to login to the admin part of the site. 2.And also is there anyway to create database and access it in google sites? 3.Also i see that only html pages can be created. Is there a way to add php pages or other scripting languages? 4.Going forward will google sites be usefull for professional web designing. pls give ideas on whether or not google sites is a good idea to go with

    Read the article

  • Apache - "dynamic" rewrite rule

    - by Christian A. Rasmussen
    Hi there. I'm working on a Zend Framework project where I've stumbled across a bit of a problem. The problem originates from the fact that modules are 2nd class citizens in Zend Framework. In my project, I'd like for each module to have a folder containing files which are to be accessed from the outside - files such as stylesheets, javascripts and images. Now, how is this to be done. With a Zend Framework project I have a folder structure which looks like this: application/ modules/ moduleOne/ public/ stylesheet.css moduleTwo/ moduleThree/ public/ index.php The standard .htaccess file located in the public/ folder holds this: SetEnv APPLICATION_ENV development RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] The way it works, is that the project's apache DocumentRoot is the public/ folder. All requests gets redirected through the index.php file where Zend Framework's router component takes over. Now, I'm by no means an expert with Apache nor mod_rewrite so pardon me if this is just silly. I imagine that I implement an extra step in the existing rewrite rule so that if I request http://project/public/moduleOne/stylesheet.css it will for instance resolve to /var/www/project/application/modules/moduleOne/public/stylesheet.css. So the steps which need to be done is to check if the first element in the URI is public/ if it is, we take the next segment as the modules name and use that in the path we're trying to resolve to and attempt to serve the file. Is this at all possible or does anyone have a better suggestion? Thank you for your time Christian Rasmussen

    Read the article

< Previous Page | 4 5 6 7 8 9 10  | Next Page >