html

How do you handle white space in your HTML

One of my biggest typographical frustrations about HTML is the way that it mangles conjoined whitespace. For example if I have: <span>Following punctuation rules. With two spaces after the period. </span> One of the two spaces following the period will be considered to be insignificant whitespace and be removed. I can of course, f...

Dynamic Alphabetical Navigation

I'm using ColdFusion to return a result set from a SQL database and turn it into a list. I need some way to generate an Alphabetical Navigation bar for that list. I have ColdFusion and the jQuery library available. I'm looking to generate something like this: A | B | C | ... A A B B B C D Where clicking on one of the letters ...

REALLY Simple Website--How Basic Can You Go?

Although I've done programming, I'm not a programmer. I've recently agreed to coordinate getting a Website up for a club. The resources are--me, who has done Web content maintenance (putting content into HTML and ColdFusion templates via a gatekeeper to the site itself; doing simple HTML and XML coding); a serious Web developer who does ...

iFrame Best Practices

Here's a lowly HTML question... I have a large, hi-def JavaScript-intensive image banner for a site I'm designing. What is everyone's opinion of using IFrames so that you incur the load time only once? Is there a CSS alternative to the IFrame? feel free to preview the site at http://csm.dev11.com It is very much a work in progress. ...

Can you set, or where is, the local document root?

When opening a file from your hard drive into your browser, where is the document root? To illustrate, given the following HTML code, if the page is opened from the local machine(file:///) then where should the css file be for the browser to find it? <link href="/temp/test.css" rel="stylesheet" type="text/css" /> ...

Click an image, get coordinates

I know it can be done and I even have a vague idea of how to do it but it stops at being vague. I have a standard HTML image tag with an image in it, 100 by 100 pixels in size. I want people to be able to click the image and for that to pass the X and Y that they click into a function. The coordinates need to be relative to the image t...

What's the best way to go from a Photoshop mockup to semantic HTML and CSS?

I generally use a manual process: Look at the page, figure out the semantic elements, and build the HTML Slice up the images I think I'll need Start writing CSS Tweak and repeat different steps as necessary Got a better approach, or a tool? ...

Nesting HTML- anchor tags

Today I was working on a tab navigation for a webpage. I tried the Sliding Doors approach which worked fine. Then I realized that I must include an option to delete a tab (usually a small X in the right corner of each tab). I wanted to use a nested anchor, which didn't work because it is not allowed. Then I saw the tab- navigation at P...

What is the easiest-to-use web "rich text editor"

I am looking for a text editor to be used in a web page. Where users can format the text and get a WYSIWYG experience. Doesn't need to be too fancy. But has to be easy to use and integrate into the page. Has to generate HTML as output. Support AJAX (one I checked works only with standard form submit) and has to be small in terms of downl...

Table cells larger than they are meant to be

I've created a map system for a game that runs on the principle of drawing the picture of the map from tiles. There are many reasons for this which I won't go into here but if you really want to know then I'm sure you can find out how to contact me ;) I have made the latest version live so you can see exactly where the problem lies and ...

Adding Inline Search function to web page

Is it possible to embed an inline search box into a web page which provides similar functionality to the IE7Pro Inline Search or similar plugins for Firefox/Safari? ...

Is there some way to show HTML content inside Flash?

I want to show HTML content inside FLASH. Is there some way to do this? I am talking about full blown HTML (with JavaScript if possible) ...

Best regex to catch XSS (Cross-site Scripting) attack (in Java)?

Jeff actually posted about this in Sanitize HTML. But his example is in C# and I'm actually more interested in a Java version. Does anyone has a better version for Java? Does his example is good enough that I could just convert it directly from C# to Java? [Update] I have put a bounty on this question because SO wasn't as popular as to...

Buffer Output

This problem started on a different board, but Dave Ward, who was very prompt and helpful there is also here, so I'd like to pick up here for hopefully the last remaining piece of the puzzle. Basically, I was looking for a way to do constant updates to a web page from a long process. I thought AJAX was the way to go, but Dave has a nice...

Are named entities in HTML still necessary in the age of Unicode aware browsers?

I did a lot of PHP programming in the last years and one thing that keeps annoying me is the weak support for Unicode and multibyte strings (to be sure, natively there is none). For example, "htmlentities" seems to be a much used funtion in the PHP world and I found it to be absolutely annoying when you've put an effort into keeping ever...

Tooltips on an image

I have an image and on it are logos (it's a map), I want to have a little box popup with information about that logo's location when the user moves their mouse over said logo. Can I do this without using a javascript framework and if so, are there any small libraries/scripts that will let me do such a thing? ...

100% Min Height CSS layout

What's the best way to make an element of 100% minimum height across a wide range of browsers ? In particular if you have a layout with a header and footer of fixed height how do you make the middle content part fill 100% of the space in between with the footer fixed to the bottom ? ...

Filtering out anchor tags in a string

I need to filter out anchor tags in a string. For instance, Check out this site: <a href="http://www.stackoverflow.com"&gt;stackoverflow&lt;/a&gt; I need to be able to filter out the anchor tag to this: Check out this site: http://www.stackoverflow.com That format may not be constant, either. There could be other attributes to the...

How do I put a space character before option text in a HTML select element?

In a drop down list, I need to add spaces in front of the options in the list. I am trying <select> <option>&#32;&#32;Sample</option> </select> for adding two spaces but it displays no spaces. How can I add spaces before option texts? ...

Regex to Parse Hyperlinks and Descriptions

C#: What is a good Regex to parse hyperlinks and their description? Please consider case insensitivity, whitespace and use of single quotes (instead of double quotes) around the HREF tag. Please also consider obtaining hyperlinks which have other tags within the <a> tags such as <b> and <i> ...