Search Results

Search found 1265 results on 51 pages for 'stylesheet'.

Page 39/51 | < Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >

  • Is there a way to have the equivalent of multiple :before and :after pseudo-elements in CSS?

    - by Sergey Basharov
    Currently I have this markup that represents an icon container and some elements styled with CSS inside it that in the end show as graphic icon. <div class="icon"> <div class="icon-element1"></div> <div class="icon-element2"></div> <div class="icon-element3"></div> </div> The number of the child elements can be different depending on the complexity of the icon. What I want is to somehow move as much as possible to CSS stylesheet, so that ideally I would have only <div class="icon"></div> and the rest would just render from CSS styles, something close in concept to :before/:after, a kind of virtual divs. I don't want to use JavaScript to add the elements dynamically. It would be possible to do this if we had multiple :before/:after. Here is an example of an icon I get by using the markup from above: As you can see, there are 3 child elements representing gray case, white screen and turquoise button. Please advise, how I can simplify this markup so that not to have to put all the divs each time I want this icon to be shown.

    Read the article

  • incorrect height in Chrome when "-webkit-appearance: none" and value="" on <input> tag

    - by Avi Steiner
    In Chrome v17.0.963.79 on Windows 7, I seem to be having an inexplicable problem when applying the -webkit-appearance: none style to an <input> tag. The problem is as follows: I have a stylesheet, let's call it potatofoot.css, which consists of the code .tbl { display: table; } .tblRow { display: table-row; } .tblCell { display: table-cell; } input { -webkit-appearance: none; }? and I have an html file, let's call it blech.html, which contains the code <div class="tbl"> <div class="tblRow"> <label class="tblCell">Name</label> <input type="text" class="tblCell" value="I'M NOT EMPTY! OH, YEAH!"> </div><!--end tblRow--> </div><!--end tbl--> This displays fine (see this jsfiddle). But when I empty the value attribute, as in this jsfiddle, the entire table grows from a height of 26px to a height of 31px, the label moves to the bottom, and the input stays at the top. However, if I remove -webkit-appearance: none;, everything shows up the same with and without out the value attribute being filled. What's going on?

    Read the article

  • How to use jquery ui slider to create a pagination effect and load the content in a <DIV>?

    - by jsust
    I want to create a pagination script using jquery UI's slider widget. So far I have got the slider working but I dont know how to send request to the server to fetch new content. So far I have a working slider <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <title>jQuery UI Slider - Range slider</title> <link type="text/css" href="themes/base/jquery.ui.all.css" rel="stylesheet" /> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jquery.ui.core.js"></script> <script type="text/javascript" src="jquery.ui.widget.js"></script> <script type="text/javascript" src="jquery.ui.mouse.js"></script> <script type="text/javascript" src="jquery.ui.slider.js"></script> <style type="text/css"> body { padding:5em; } </style> <script type="text/javascript"> $(function() { $("#slider-range").slider({ min: 1, max: 14, values: [1], slide: function(event, ui) { $(".values").html(ui.values[0];); } }); }); </script> </head> <body> <div class="values" style="padding:2em;"></div> <div id="slider-range"></div> <div class="info" style="margin-top:2em; background:#CCC;padding:2em;"> Here is where the content will be displayed. </div> </body> Thanks in Advance

    Read the article

  • Getting a table cell to become a different color on mouseover

    - by Andrei Korchagin
    Currently, when I create a table, and I mouseover a cell, that entire row is highlighted. I'm trying to make it so that it is only the immediate cell. Here's all the CSS code that pertains to tables in my stylesheet: table{margin:.5em 0 1em;} table td,table th{text-align:center;border-right:1px solid #fff;padding:.4em .8em;} table th{background-color:#5e5e5e;color:#fff;text-transform:uppercase;font-weight:bold;border- bottom:1px solid #e8e1c8;} table td{background-color:#eee;} table th a{color:#d6f325;} table th a:hover{color:#fff;} table tr.even td{background-color:#ddd;} table tr:hover td{background-color:#fff;} table.nostyle td,table.nostyle th,table.nostyle tr.even td,table.nostyle tr:hover td{border:0;background:none;background-color:transparent;} I know it's probably a simple fix but I can't find where to make it work. Everything I try just kills the mouseover effect entirely rather than making it the way I want it. Thanks in advance!

    Read the article

  • KO3: How to deal with stylesheets and scriptfiles

    - by Svish
    I'm using Kohana 3 and it's template controller. My main site template controller currently looks something like this: <?php defined('SYSPATH') or die('No direct script access.'); abstract class Controller_SiteTemplate extends Controller_Template { public function before() { parent::before(); // Initialize default template variables $this->template->styles = Kohana::config('site.styles'); $this->template->scripts = Kohana::config('site.scripts'); $this->template->title = ''; $this->template->content = ''; } } And then in my template view I do: <?php # Styles foreach($styles as $file => $media) echo HTML::style($file, array('media' => $media)).PHP_EOL ?> <?php # Scripts foreach($scripts as $file) echo HTML::script($file).PHP_EOL ?> This works alright. The problem is that it requires the style- and script files to be added in the controller, which shouldn't really have to care about those. It also makes it a hassle if the views are done by someone else than me since they would have to fool around with the controller just to add a new stylesheet or a new script file. How can this be done in a better way? Just to clearify, what I am wondering is how to deal with page specific stylesheets and scripts. The default and site-wide ones I have no problem with fetching from a config file or just put directly in the template view. My issue is how to add custom ones for specific pages in a good way.

    Read the article

  • IE8 Using Google Font on ENTIRE Page Instead of Just Selected Text

    - by Jim
    All my web searches for Google Fonts with IE8 show people talking about google fonts just not loading or not showing up. I don't have that problem. Instead IE8 is loading my Google Font just fine, but its applying the font to ALL the type on the page! Things seem to be fine in other browsers. Is there some kind of glitch in my CSS that IE is choking on? http://nbkclientsite.fuzzpopstudio.com/ Ok here's some of the relevant css: body { font-size: 16px; font-size: 1rem; font-family: Helvetica-Neue,Helvetica, Arial, sans-serif; text-rendering: optimizeLegibility; color: #444; } .contact-us-text { font-family: 'Arvo', serif; font-size: 150%; color: #2770b4; } .contact-us-phone { font-family: 'Arvo', serif; font-size: 175%; } Everything pertinent should be in just one style sheet. You can easily view it with Firebug or Chrome's Inspector or whatever you want. In FF and Chrome, everything is inheriting Helvetica or Arial as it should be. But not in IE8. You'd have to use Firebug and view the entire stylesheet if you want to see more.

    Read the article

  • controlling css with javascript works with mozilla but not with webkit based browsers

    - by GlassGhost
    Im having problems with applying css text variable in this javascript with webkit based browsers(Chrome & Safari) but it works in firefox 3.6 the function: function addGlobalStyle(sCss) { var head = document.getElementsByTagName('head')[0]; if( !head || head == null ) { return false; } var oStyle = document.createElement('style'); oStyle.type = 'text/css'; oStyle.rel = 'stylesheet'; oStyle.media = 'screen'; if ( is_gecko ) { // firefox WORKING !!! oStyle.href = 'FireFox.css'; oStyle.innerHTML = sCss; head.appendChild(oStyle); return true; } else {//nothing but firefox works oStyle.href = 'FireFox.css'; oStyle.innerHTML = sCss; head.appendChild(oStyle); return true; } } the use of the function: var NewSyleText = //The page styling "h1, h2, h3, h4, h5 {font-family: 'Verdana','Helvetica',sans-serif; font-style: normal; font-weight:normal;}" + "body, b {background: #fbfbfb; font-style: normal; font-family: 'Cochin','GaramondNo8','Garamond','Big Caslon','Georgia','Times',serif;font-size: 11pt;}" + "p { margin: 0pt; text-indent:2.5em; margin-top: 0.3em; }" + "a { text-decoration: none; color: Navy; background: none;}" + "a:visited { color: #500050;}" + "a:active { color: #faa700;}" + "a:hover { text-decoration: underline;}"; addGlobalStyle(NewSyleText);//inserts the page styling

    Read the article

  • This simple XHTML will not validate. What is the problem?

    - by Justice Conder
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <?xml version="1.0" encoding="UTF-8"?> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>My Title</title> <link rel="stylesheet" type="text/css" href="myStyle.css"/> </head> <body> <div> <h1>Heading One</h1> <p class="para1">Paragraph One</p> <h3>Heading Two</h3> <p>Paragraph Two</p> <h3>Heading Three</h3> <p>Paragraph Three<p> <br /> <a href="Lab1Page2.html">Link One</a> <br /> <a href="Lab1Page3.html">Link Two</a> </div> </body> </html>

    Read the article

  • Firefox and Chrome do not support cross-domian ajax by default?

    - by Ethan
    The following code works as expected in IE8 and Safari4, but not work in Firefox3.6 and Chrome. All browsers are on Windows. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/smoothness/jquery-ui.css" rel="stylesheet" type="text/css" /> <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://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script> <script type="text/javascript"> $(function() { $('#tabs').tabs(); }); </script> </head> <body> <div id="tabs"> <ul> <li><a href="http://www.google.com/">Google</a></li> <li><a href="http://www.msn.com/">MSN</a></li> </ul> </div> </body> </html> Seems that Firefox and Chrome do not support cross-domian ajax by default, right? Is there any easy way to turn on cross-domian ajax in Firefox and Chrome?

    Read the article

  • Font for tabs looks a little too big

    - by cf_PhillipSenn
    I'm using the default for jQueryUI, but it looks like the font is a little big. I know that one solution would be "WELL! JUST MAKE IT SMALLER!", but I'm just wondering if I've messed something up or I don't have a value set correctly before I charge in and start changing things. <!DOCTYPE HTML> <html> <head> <script src="http://www.google.com/jsapi"></script> <script type="text/javascript"> google.load("jquery", "1"); </script> <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1/themes/smoothness/jquery-ui.css" type="text/css" media="all" /> <script type="text/javascript"> google.load("jqueryui", "1"); function OnLoadCallbackUI(){ $('#tabs').tabs(); } google.setOnLoadCallback(OnLoadCallbackUI); </script> </head> <body> <div id="tabs"> <ul> <li><a href="#tabs-1">tab1</a></li> <li><a href="#tabs-2">tab2</a></li> </ul> <div id="tabs-1"> tabs-1 </div> <div id="tabs-2"> tabs-2 </div> </div> </body> </html>

    Read the article

  • CSS class not working as expected [closed]

    - by user1050619
    My HTML codes not implement the CSS styling..The border in the CSS file is not being implemented. I tried both in Firefox & IE. Please provide your inputs. Please find the code below: HTML <html> <head> <link href="file://c:/jquery/chapter-1/begin/styles/my_style.css" rel="stylesheet"> </head> <body> <div id="header" class="no_hover"><h1>Header</h1></div> <button type="button" id="btn1">Click to Add</button> <button type="button" id="btn2">Click to Remove</button> <script src="file://c:/jquery/chapter-1/begin/scripts/jquery.js" type="text/javascript"></script> <script src="file://c:/jquery/chapter-1/begin/scripts/test4.js" type="text/javascript"></script> </body> </html> jS FILE $(document).ready(function() { $("#btn1").click( function(){ $("#header").addClass("hover"); $("#header").removeClass("no_hover"); }); $("#btn2").click( function(){ $("#header").removeClass("hover"); $("#header").addClass("no_hover"); }); }); CSS FILE .hover{ border: solid #f00 3px; } .no_hover{ border: solid #000 3px; }

    Read the article

  • Heroku "We're sorry, but something went wrong." due to javascript_include_tag

    - by Newton
    Uploading my ruby on rails app to heroku causes the following error: We're sorry, but something went wrong. This does not occur on my local machine. After some debugging, I think I may have spotted the error, but do not know how to fix it. In my file application.html.erb, removing the following line solves the problem, but then my app loses its jquery mobile theme. Any ideas what I could do to fix the problem? Line causing the problem: <%= javascript_include_tag "application" %> application.html.erb file: <!DOCTYPE html> <html> <head> <title>Washapp</title> <meta name="viewport" content="width=device-width"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.css" /> <%= javascript_include_tag "application" %> <script src="http://code.jquery.com/mobile/1.0.1/jquery.mobile-1.0.1.min.js"></script> <%= csrf_meta_tags %> <script> if (window.location.hash == "#_=_") window.location.hash = ""; </script> </head> <body> <div data-role="page"> <%= yield %> </div> </body> </html>

    Read the article

  • Why doesn't line-height work on FF/3.5.8(Mac)?

    - by Znarkus
    I can't get line-height on a text input to work on Firefox 3.5.8/(Mac). Works flawlessly on: IE6 IE7 IE8 FF3.6/PC FF3.6/Mac Safari Test code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>asd</title> <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.0r4/build/reset/reset-min.css" /> </head> <body> <input type="text" value="Hello" style="line-height:50px;height:50px;font-size:16px;" /> <input type="text" value="Hello" style="padding:17px 0;font-size:16px;" /> </body> </html> Is there an alternate solution or any idea how to fix this? Edit: Updated the test code, to compare line-height vs. padding technique. Padding works on all above browsers except IE8. Whaat? I can't test on FF/3.5.8 anymore, could someone please report the result from this browser on any plattform? I'm now thinking this is a Firefox 3.5.8 issue, plattform independent.

    Read the article

  • Detect mouseover and show tooltip text for dots on an HTML Canvas

    - by carl asquith
    Ive recently created a "map" although not very sophisticated (im working on it) it has the basic function and is generally heading in the right direction. If you look at it you can see a tiny red dots and on those tiny red dots i want to mouseover it and see text basically but ive had a bit of trouble getting the code right. http://hummingbird2.x10.mx/website%20creation/mainpage.htm This is all the code so far. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Oynx Warrior</title> <link rel="stylesheet" type="text/css" href="mystyle.css" /> </head> <body> <h1>Oynx Warrior</h1> <canvas id="myCanvas" width="500" height="500" style="border:1px solid #c3c3c3;"> Your browser does not support the canvas element. </canvas> <script type="text/javascript"> var c=document.getElementById("myCanvas"); var cxt=c.getContext("2d"); cxt.fillStyle="#red"; cxt.beginPath(); cxt.arc(50,50,1,0,Math.PI*2,true); cxt.closePath(); cxt.fill(); </script> </body> </html>

    Read the article

  • VS2010 and CSS: What is the best way to position a single form control

    - by George
    OK, I have a ton of controls on my page that I need to individually place. I need to set a margin here, a padding there, etc. None of these particular styles that I want to apply will be applied to more than control. What is the bets practice for determining at which level the style is placed, etc? OK, my choices are 1) External CSS file 1A) Using ClientIdMode = Auto (the default) I could assign a unique CssClass value to the ASP.NET control and, in the external CSS file, create a class selector that would only be applied to that one control. 1B) User Client ID = Predicatable In the external CSS file, I could determine what the ID will be for the controls of interest and create an ID selector (#ControlID{Style} ). However, I fear maintenance issues due to including/removing parent containers that would cause the ID to change. 1C) User Client ID = Static. I could choose static IDs for the controls such that I minimize the likelihood of a clash with auto generated IDs (perhaps by prefixing the ID with "StaticID_" and use an external stylesheet with ID selectors. 2) I could place the style right on the control. The only disadvantage here, as I see it, is that style info is brought down each time instead of being cached , which is what I'd get using an external CSS. If a style isn't resused, I personally don't see much benefit to placing it in an external file, though please explain why if you disagree. Is there moire of a reason that "It's nice to have all the CSS in one place?"

    Read the article

  • End-date greater than start-date validation javascript not working properly

    - by ianco slovak
    I am trying to make a validation for my dates so that enddate to be greater than start date but is not working.What am i doing wrong? <head> <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> <link href="@Url.Content("~/Content/Site.css")" rel="stylesheet" type="text/css" /> <script src="@Url.Content("~/Scripts/jquery-ui-1.8.19.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-ui.unobtrusive.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/jquery-ui.unobtrusive-0.5.0.min.js")" type="text/javascript"></script> <script src="@Url.Content("~/Scripts/gen_validatorv4.js")" type="text/javascript"></script> </head> @using (Html.BeginForm("SearchFree", "Reservation", FormMethod.Get,new {id = "form" })) { <h7>Introduceti perioada Rezervarii</h7> <div class="editor-label"> <label id="cautare" for="StartDate">Data Intrare: </label>@(Html.JQueryUI().Datepicker("StartDate").DateFormat("mm-dd-yy").MinDate(DateTime.Today).ShowButtonPanel(true).ChangeYear(true).ChangeMonth(true).NumberOfMonths(2)) </div> <div class="editor-label"> <label id="cautare" for="EndDate">Data Iesire:</label>@(Html.JQueryUI().Datepicker("EndDate").DateFormat("mm-dd-yy").MinDate(DateTime.Today).ShowButtonPanel(true).ChangeYear(true).ChangeMonth(true).NumberOfMonths(2)) </div> <p> <input id="buton1" type="submit" value="Cauta camere libere" /> </p> } <script type="text/javascript"> $(document).ready(function () { $.validator.addMethod("EndDate", function (value, element) { var startDate = $('.StartDate').val(); return Date.parse(startDate) <= Date.parse(value); } , "* End date must be after start date"); $('.form').validate(); }); </script>

    Read the article

  • are margin and padding most disbalanced thing among all browser?

    - by metal-gear-solid
    While some people use this reset. * { margin: 0; padding: 0; } Is every element has default margin and padding in each browser default stylesheet( but differently)? While eric meyer collected some most used selectors and given this to all { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } Are those elements has different type of font sizes? different baseline, different background, outline and border? if we keep besides cons of universal selector. is this * { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } better than this * { margin: 0; padding: 0; }

    Read the article

  • Importing a div's content from a Static HTML file using PHP or jQuery or Ajax?

    - by Vikram
    Hello friends a newbie question... The Issue is like this: I have a static HTML file and I want to import just a portion of that file into another page. How can I do that. Example Code: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Some title here</title> <link rel="stylesheet" type="text/css" href="styles.css" /> </head> <body> <div id="box-1"> <div class="block"> <!-- Some code here --> </div> </div> <div id="box-2"> <div class="block"> <!-- Some code here --> </div> </div> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script src="script.js"></script> </body> </html> Now what I want is to read this HTML file and import just this bit: <div id="box-1"> <div class="block"> <!-- Some code here --> </div> </div> Is there a way of doing it? Kindly help. Even a PHP, jQuery, Ajax or any other solution will also do. Please help me.

    Read the article

  • A beginner question on passthru() function in PHP

    - by Robert
    Hi all, I've used the following code to do an XSLT translation in PHP and save the result SVG file into a sub folder: $command = $java . $saxon . $target2 . ' ' . $xsl2.' '.$param; ob_start(); passthru($command, $result); $content_grabbed=ob_get_contents(); ob_end_clean(); $info = pathinfo($_FILES['file']['name']); $file_name= basename($_FILES['file']['name'],'.'.$info['extension']); $myFile = "images/convert/".$file_name."_".$_POST["mydropdown"].".svg"; $fh = fopen($myFile, 'w') or die("can't open file"); fwrite($fh, $content_grabbed); fclose($fh); It does a very simple SVG to SVG transformation, and created the resulting SVG file. the $command is just a simple java -jar saxon.jar input.xml stylesheet java command. The current situation is ,the file gets created perfectly, however, the error gets shown in browser, probably because I inserted the "ob_start" before passthru() command. I am thinking of making use of an argument that comes with the saxon.jar, that is "-o output_file_name". Because the final purpose is not to display the resulting SVG to the browser, but instead creating an SVG file ,and provide the link to the user for downloading. Are there any better ways to handle this problem, I am still thinking about how to get rid of the result that gets shown in the browser that is sent by the "passthru()". Thanks in advance for suggestions!

    Read the article

  • PHP Foreach statement issue. Multiple rows are returned

    - by Daniel Patilea
    I'm a PHP beginner and lately i've been having a problem with my source code. Here it is: <html> <head> <title> Bot </title> <link type="text/css" rel="stylesheet" href="main.css" /> </head> <body> <form action="bot.php "method="post"> <lable>You:<input type="text" name="intrebare"></lable> <input type="submit" name="introdu" value="Send"> </form> </body> </html> <?php //error_reporting(E_ALL & ~E_NOTICE); mysql_connect("localhost", "root", "") or die(mysql_error()); mysql_select_db("robo") or die(mysql_error()); $intrebare=$_POST['intrebare']; $query = "SELECT * FROM dialog where intrebare like '%$intrebare%'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); ?> <div id="history"> <?php foreach($row as $rows){ echo "<b>The robot says: </b><br />"; echo $row['raspuns']; } ?> </div> It returns me the result x6 times. This problem appeared when I've made that foreach because I wanted the results to stuck on the page one by one after every sql querry. Can you please tell me what seems to be the problem? Thanks!

    Read the article

  • Loop through a set of HTML files and append text at top and bottom of each file

    - by NJTechGuy
    For instance, I have an HTML file like this : a.htm <body> Hello world! </body> I want : a.htm <html> <LINK href='style.css' rel=stylesheet type='text/css'> <body> Hello world! </body> </html> The code I have so far is : #!/bin/sh for i in `ls *.htm` do @echo off echo ***New top line*** > temp.txt type i >> temp.txt echo ***New bottom line*** >> temp.txt move /y temp.txt i done Errors : abc@bunny:~/fileAppendText$ ./loopAllFilesTest.sh ./loopAllFilesTest.sh: line 5: @echo: command not found ./loopAllFilesTest.sh: line 7: type: i: not found ./loopAllFilesTest.sh: line 9: move: command not found ./loopAllFilesTest.sh: line 5: @echo: command not found ./loopAllFilesTest.sh: line 7: type: i: not found ./loopAllFilesTest.sh: line 9: move: command not found ./loopAllFilesTest.sh: line 5: @echo: command not found ./loopAllFilesTest.sh: line 7: type: i: not found ./loopAllFilesTest.sh: line 9: move: command not found Please help. Thanks!

    Read the article

  • Page Entirely Blank Despite Having Source Code! (TinyMCE, FireFox)

    - by Chris Cooper
    Alright guys, here's a tough one... In reference to this page. The page will seemingly randomly not display the output of server when using Firefox (version 3.5). I have not seen this problem occur in Safari or IE. The best way to have the problem occur is just reload the page about 10 times and it ought to have happened by then, and once it does - it'll continue on subsequent refreshes until you change the page. The problem is literally the browser not displaying the output (code). Viewing the source shows all the appropriate code yet the browser displays a blank white page. The web developer and firebug plugins don't show any errors that would indicate the problem. I have tested this on a separate system and OS and it occurs in Firefox on that system as well. The problem did not occur until after TinyMCE (A Rich Text Editor JavaScript library for textareas) was added to the project. TinyMCE works however, where it should. I know this is a confusing problem, but I am completely lost as to what could be causing this significant issue. Thanks in advance. EDIT: If it's any help... I've noticed that if I cause a css file error by changing a stylesheet source to something non-existant (xxx.css), the page will continuously display without a problem (besides whatever related css not showing due to the src change). I've also noticed that causing any simple javascript error with some bad code will cause the page to load properly continuously (besides of course javascript not running on the page). EDIT#2: Moving all <script> tags down at the tail of the <body> 'fixes' (well, hides) this error and the page shows normally. A band-aid.

    Read the article

  • CSS file in a Spring WAR returns a 404

    - by Rachel G.
    I have a J2EE application that I am building with Spring and Maven. It has the usual project structure. Here is a bit of the hierarchy. MyApplication src main webapp WEB-INF layout header.jsp styles main.css I want to include that CSS file in my JSP. I have the following tag in place. <c:url var="styleSheetUrl" value="/styles/main.css" /> <link rel="stylesheet" href="${styleSheetUrl}"> When I deploy the application, the CSS page isn't being located. When I view the page source, the href is /MyApplication/styles/main.css. Looking inside the WAR, there is a /styles/main.css. However, I get a 404 when I try to access the CSS file directly in the browser. I discovered that the reason for the issue was the Dispatcher Servlet mapping. The mapping looks as follows. <servlet-mapping> <servlet-name>Spring MVC Dispatcher Servlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> I imagine the Dispatcher Servlet doesn't know how to handle the CSS request. What is the best way to handle this issue? I would rather not have to change all of my request mappings.

    Read the article

  • Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in

    - by user1493540
    <html> <title>Title</title> <body> <link type="text/css" rel="stylesheet" href="css/bootstrap.css"/> </body> <center> <? mysql_connect ("localhost", "root","") or die (mysql_error()); mysql_select_db ("dbname"); $term = $_POST['term']; $sql = mysql_query("select * from items where name like '%$term%'"); while ($row = mysql_fetch_array($sql)){ echo '<table class="table - striped"> <theader> <tr> <th>ID</th> <th></br> Name</th></tr>'; echo ' <tbody><td>'.$row['id']; echo'</td>'; echo '<td>'; echo '</theader>' .$row['name']; echo '</td>'; echo ''; } ?> </center> <script src="js/bootsrap.js"> </script> </html> I'm, getting this error: Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/runedev1/public_html/itemdb/search.php on line 19 When I run the code on localhost using Xampp, it works fine, when I upload it to the web-host, the error appears. Yes, I am changing the database name, user and password when putting it on the webhost.

    Read the article

  • How can I "reset" styles for a given HTML element?

    - by Sambo
    I am working on an embeddable javascript which inserts HTML elements onto unknown pages. I have no control of the stylesheets of the pages I'll be inserting HTML into. The problem is that the HTML I insert will mistakenly stylized by the page, and I want to prevent that. What's the least verbose and/or resource intensive to go about ensuring the elements I insert are exactly as I'd like them to be? Is there an easy way to clear all styling for a given HTML element and children? In firebug, for instance, you can remove all styling. I feel like there must, and the very least should, be a native way to exempt certain HTML elements from stylesheet rules? Example: var myHTML = $("<div>my html in here</div>"); myHTML.resetAllStyles(); //<--- what would this function do? myHTML.appendTo("body"); I really want to avoid explicitly stating the attributes I want for each element I insert... PS: I have a lot of experience with JS and CSS, so you can assume that I'll understand pretty much anything you're going to tell me.

    Read the article

< Previous Page | 35 36 37 38 39 40 41 42 43 44 45 46  | Next Page >