html

How do I vertically align something inside a span tag?

How do I get the "x" to be vertically-aligned in the middle of the span? .foo { height: 50px; border: solid black 1px; display: inline-block; vertical-align: middle; } <span class="foo"> x </span> ...

What happens if the action field in a <form> has parameters?

Is there a well-supported, common behavior that I can expect if I do something like this in HTML: <form method="get" action="/somePage.html?param1=foo&param2=foo"> <input name="param2"></input> <input name="param3"></input> </form> Seems like this sort of thing is inherently ridiculous, but I've seen it used here and there and I w...

Prevent existing CSS from styling injected HTML/CSS

I'm working on a project which injects JS+CSS+HTML over web pages which I do not have control over. I am concerned about the host page styling my injected code -- I want my injected code to only obey my styling, and not theirs. At the moment the only method to do this I can think of involves explicitly specifying every possible tag for...

Internet Browsers

I have internet explorer and Firefox and i am setting firefox as my default browser. If i open a .html or .mht file in which browser will that file open Where in the registry the changes regarding the default browser will be made ...

troublesome javascript

I'm trying to make a little tag list doohickey for adding and removing tags. I have a textbox where the user can enter the tags, separated by commas. and an add button. I would like it for when the user clicks the add button to add a small div to the inside of a div below the box. the small div should contain the tag and a little x for w...

What are the technological limits to the usability of AJAX web apps?

I am trying to understand the technical limits to the usability of web-based productivity applications that use only open, cross-platform technologies such as Javascript, HTML, and CSS on the client. [1] Let's assume for a moment that in the next few years the capabilities of web browsers continue to improve (e.g. with HTML 5 and faster...

What php html tokenizer's can I use?

I need to process html submitted in my web application and don't want to munge the whole thing with regular expressions. What tokenizer approach and/or software should I take? ...

How to display only parts of several urls into one html file ?

In the past I was using iframe but it displayed all the webpage urls contents in full. For example: I have saved the following code in a file named "trial.html" : <iframe src="http://stackoverflow.com/unanswered" width=1100 height=1500></iframe> <iframe src="http://stackoverflow.com/questions" width=1100 height=1500></iframe> When I ...

Whitespace removal affecting rank?

I've recently attempted to remove all useless whitespaces/linefeeds/linebreaks from my HTML code and apparently as a result my site got delisted/google ranks dropped dramatically (from top10 to surely out of top100). Is whitespace removal a bad SEO practice or could it be that my pages had a keyword density that was too high after whites...

"display:none" content copied to clipboard, visible when pasted

Hi all, I'm having a problem with non-displayed HTML elements being copied to the clipboard, and then displayed when the content is pasted into MS Word, Outlook, etc. For example: <p>Hello</p> <p style="display: none;">I'm Hidden</p> <p>World</p> If I view that HTML in a browser, copy the text to my clipboard, then paste into Outloo...

Javascript syntax problems -- finding it.

I have the following javascript snippet, which fails to load due to a missing ; before statement before thr declarion of url withing searchUserInfo.. I have double and triple checked this code function submitUserInfo(username) { url = "edit_user.php?cmd=submitinfo&username="+username+"&firstname="+document.userForm.firstname.value+...

Is it possible to hide or scramble/obfuscate the javascript code of a webpage?

I understand that client side code must be readable from the browser but I wonder (since there are too many things that I ignore) if there are ways to obfuscate to code to the end user and, if not what is the best practice to "pack" the javascript code. ...

Proper way to change individual list item bullets

I have css like this: .done {list-style-image:url('images/tick.gif')} .notdone {list-style-image:url('images/cross.gif')} And html like this: <ul> <li class="done">Done</li> <li class="notdone">Not Done</li> </ul> Works great on IE6 and FF. Each li item has a different image for the bullet. But all of the docs I see on list-styl...

How to make an html page open automatically on a CD/DVD

I need to include an html page (table of contents) on a CD/DVD. I'd like the html page to open automatically when the user puts the CD/DVD in their machine. Is there a way to do this (the MSDN cds do this) either by purchasing software or otherwise? ...

Another Safari width issue with CSS

I am making this web site http://www.christopherbier.com/gbg/locations.html In safari on mac the content div is larger in width than it is in other browsers. It overlaps the right side bar bit. I am not sure how to fix this. Here is my css: #mainwrap { width:1000px; margin-right:auto; margin-left:auto; background-color:...

Trim string to length ignoring HTML.

This problem is a challenging one. Our application allows users to post news on the homepage. That news is input via a rich text editor which allows HTML. On the homepage we want to only display a truncated summary of the news item. For example, here is the full text we are displaying, including HTML In an attempt to make a b...

HTML textbox, auto highlighting text

How would I make a textbox, containing preexisting text, that when the user clicked within it all the text inside it would become highlighted. For example, the same way YouTube does the textboxes for the embed code on their videos. Thanks ...

How to detect right mouse click while left mouse button is pressed in IE?

I have the following: <html> <body oncontextmenu="return false;"> <script src="jquery-1.3.2.min.js"></script> <script> $(document).ready(function() { $(document).mousedown(function(e) { if (e.button == 2) //right click { document.body.style.backgroundColor = "green"; } else //left clic...

How to format the text as bold , underline in XSLT

I've got some XML piece of code. I would like to use XSLT to transform it into HTML . The problem is that I would like to format the output text as bold and underline. But I don't know how to format text as bold and underline in XSLT. Would you please help me? Please provide some example code for this. Thank you so much. ...

Scrape HTML out of AJAX loaded pages

There's a site that uses AJAX to load in the HTML content, so when I attempt to access the URL of the page, it comes up blank. How can I scrape this site's HTML client/server side? ...