html

Why do multiple spaces in an HTML file show up as single spaces in the browser?

I have long recognized that any set of whitespace in an HTML file will only be displayed as a single space. For instance, this: <p>Hello. Hello. Hello. Hello. Hello.</p> displays as: Hello. Hello. Hello. Hello. Hello. This is perfectly fine, as if you need multiple spaces of...

Extended css sprites not working with :hover?

Hi, I just encountered this article of an extention of css sprites that enables the spriting trick with foreground images . I tried to use the technique on :hover but it doesn't appear to work in IE and Opera. See my attempt to use this technique for a menu here: http://www.kavoir.com/examples/jenny-css-sprites/menu.html On FF and Safa...

Place button in a form that does not use the form's URL

I have a regular form with a url as action to which the form submits when the submit button is clicked (or enter is pushed). Now I need a second button that goes to another page. I know I should be using a link for this, but as to client's requirements, it should look like a button. Because the CSS sheets are not made in-house (and commu...

Universal document format converter

I am looking to convert any format to/from HTML. I'd like to support DOC, DOCX, PDF, ODT, RDF, DocBook, and TXT. I have found lots of format-to-format conversion utilities, but for convenience of implementation, a single tool is best. This will also make it easier to add new formats as the vendor or open-source project expands the lib...

Should I "quick list" my drop-down list of countries?

My members can choose from a list of countries. The A-Z lists starts at Afghanistan, and goes through many obscure countries. Should I get the top ten countries and "quick-list" them at the top of the list? Or is this seen as some sort of cultural superiority yadda yadda? I'm using PHP/MySQL (trying to get a programming angle there) ...

HTML downloading and text extraction

What would be a good tool, or set of tools, to download a list of URLs and extract only the text content? Spidering is not required, but control over the download file names, and threading would be a bonus. The platform is linux. ...

Form Post Values using plain html controls in ASP.NET web forms

I have a simple form with some plain html input like bellow using ASP.NET Web Forms (not MVC) <table id="tbl_SchoolDetails"> <tbody id="tbody_SchoolDetails"> <tr> <td> School Name </td> <td> <input id="SchoolDetails_SchoolName" type="text" value="<%= ViewModel.School.Name %...

Dynamically updating an RSS feed URL

Is it possible to dynamically the URL of a feed that has been instantiated in the header of a page via JavaScript? For example, is it possible to update the URL of the rss feed in the following snippet: <html> <head> <link rel="alternate" title="Feed" href="/rss.feed" type="application/rss+xml"> </head> <body> ... </bod...

Where is the best place to put <script> tags in HTML markup?

When embedding JavaScript in an HTML document, where is the best place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the <head> section, but placing at the beginning of the <body> section is bad, too, since the JavaScript will have to be parsed before the page is rendered c...

Form submission asks to save exe, would like it to run instead

When I submit my basic form from the html file, it gives me the option to save the exe I just want the exe to run instead. (To re-populate the template html file) What do I need to do to just run the exe once the form is submitted? <form action="Lib.exe" method=POST ID="Form1"> Enter Index to DELETE<br> <input type=text name="user" ID...

How can I hook up to Excel events in Javascript

In a client-side web application, I would like to: open an Excel spreadsheet, export some application data to Excel, allow the user to work with it, and when they are done, read the (potentially changed) data back into my application. I would like the user to have a fluid experience and detect when they are done with excel by hooking...

When Should One Use HTML Entities

This has been confusing me for some time. With the advent of utf-8 as the de-facto standard in web development I'm not sure in which situations I'm supposed to use the html entities and for which ones should I just use the utf-8 character. Examples: em dash, ampersand, etc. Please do shed light on this issue. It will be appreciated. ...

What is the best way to display spreadsheet data in Ruby on Rails?

I am looking for a way to edit data and have values dynamically calculated (i.e. totals, averages, etc.) My application is a web based gradebook system for teachers and one of the big challenges is allowing them to enter/update grades. The most natural solution for this type of data is a table or spreadsheet grid and my first thought w...

What's up with innerHTML and <embed>?

I'm trying to fix a bug in a rich text editor I'm using, which causes <embed> tags to be inserted without their closing tag (which screws the output up completely). I've isolated the problem to this operation: // body is a <body> tag body.innerHTML = '<embed src="http://example.com/whatever"&gt;&lt;/embed&gt;'; No fancy code, just Fir...

Best way to code stackoverflow style 'questions' / 'tags' rollover buttons

Whats the best way to implement rollover 'buttons' like Stackoverflow has for 'Questions', 'Tags', 'Users' at the top. It is actually implemented like this : <div class="nav"> <ul class="primarynav"> <li class=""> <a href="/questions">Questions</a> </li> <li class=""> <a href="/tags">...

How to Vertically Align a Table in CSS

How can I vertically align a table in the middle of the screen with css? ...

Getting rid of disc in list item

Hi, I'm developing a site using jQuery, and jQuery UI tabs. For some reason, my tabs (unordered list) are showing their bullets in all browsers (tested thus far) except Firefox 3 on OS X. It displays them in Safari OS X, FF 3 Windows, and Google Chrome Windows (IE displays all the divs in a big stack in the corner... but that's anot...

HTML Tool to determine where style is coming from

I have an ASP.NET page where I need to figure out where the style for a textbox is coming from. There are several style sheets defined for the page and I want to be able to use some sort of tool / editor that will tell me what styles were used and from what file(s) to render the textbox. Thank you. ...

Is there a way to password protect HTML pages without using a server side language?

I have a series of interlinked web pages, and I want to restrict access to these pages by asking the user to provide a login and password. However, my hosting account currently does not provide any facility for server side scripting - is there any way I can accomplish this objective using only client side scripts? I was wondering how th...

Is it all right to add custom Html attributes?

I have a site I'm working on where I want to mark if a row of data has been changed. If something has been changed in that row I would mark it with a custom attribute like so. <tr> <td isDirty="true"> ....row data <td> </tr> This works great with jQuery and it doesn't add to much code to my page. But is this really the corre...