html

Converting ANSI escape sequences to HTML using PHP

This is a similar question to this one. I would like to convert ANSI escape sequences, especially for color, into HTML. However, I would like to accomplish this using PHP. Are there any libraries or example code out there that do this? If not, anything that can get me part way to a custom solution? ...

Setting a 4px height on a div results in a ~12 pixel space in IE8

<div id="spacer"> </div> + #spacer { height: 4px; } Firefox and Safari do it right, the space on screen is small. IE8 makes it bigger than 4px. WTF. If I set it to 200 pixels or whatever, the space is huge. It decreases until I get to around 15 px, at which point IE continues to draw a 15ish px space despite the css saying 4...

Printing HTML in WPF

I have some HTML content that I need to print. For other printing tasks, I've had great success using the PrintDialog class by grabbing a grid out of my resources, setting the grid's DataContext property to a ViewModel, and then passing the grid to the PrintVisual method. I tried using the above method to print HTML by instantiating a S...

Finding the next hidden div and showing it with a jQuery selector.

Hello, I'm building a slideshow in jQuery that allows the user to see four images, and page through them, forwards and backwards by appending a new div with the image to the bottom via .load, and then hiding the top div. I'm very new to programming. I'm having trouble working out a selector to allows the user to go "back" showing the n...

PHP: Defining relative paths compatible with HTML Tags

Consider the following directory structure: ROOT ------ images ............... logo.png ------ includes ............... vars.php ------ layout ............... content.php ------ index.php How do I define a path constant for logo.png in vars.php that is accessible in both index.php and content.php? Should be compatible with HTML Tags ...

PHP and regular expressions: how to get the character count of all characters in a string containing HTML, but measuring only 20 visible words?

I am working on a WordPress site where one of the pages lists excerpts about corporate clients. Let's say I have a web page where the visible text looks like this: "SuperAmazing.com, a subsidiary of Amazing, the leading provider of integrated messaging and collaboration services, today announced the availability of an enhanced version...

jQuery .click function - prevent it from being called again until function completes.

I've written my first bit of proper jQuery for an image slideshow, that allows users to scroll up and down through some images: $(window).load(function(){ $('.scrollUp').click(function(){ $('.cardWrapper:visible:first').prevAll(':hidden:first').slideDown(function(){ $('.cardWrapper:visible:last').slideUp(); }); r...

html to pdf for a Django site

For my django powered site, I am looking for an easy solution to convert dynamic html pages (generated using django views and templates datas generated using GET forms) which also contains some graph charts from google visualisation api(it is javascript, yet including these graphs is a must for me) to pdf. Cheers ...

Noob CSS Position Question

Hello, I'm trying to stack images on top of each other inside of a table. I want my page to look like the image below. As you can see, there are four boxes with a b&w number image in each. Hidden under the first box is a duplicate box with a color number image. Here's my HTML and CSS code I have... <div id="projects" class="p...

IE6: span (inline) with background-image

I'm trying to find a good why to display my Icons. I want to use a CSS and not an img tab. My code: <span id="Span1" class="iconPrinter"></span> .iconPrinter{background:url(../images/BWIcons.gif) no-repeat 0 0; padding:0 8px;} or .iconPrinter{background:url(../images/BWIcons.gif) no-repeat 0 0; width:16px;} It works fine on FF bu...

How to See Errors In IE 7

I am using javascript and ajax the most in my project source. All functions are working well in firefox. But some of them are not working in ie 6 and 7 browsers. Mainly Delete is not working for any page in my project. I dont know how to resolve those bugs. And dont know how to see errors in ie browsers.. So Plz help me to resolve this i...

Reading form action property in IE6, if form has a field named "action"

Given the form below: <form id="myForm" action="index.php"> <input type="hidden" name="action" value="list" /> <input type="submit" /> </form> How can I get the value for the action property of the form (index.php) using IE6? Hint: I have tried document.getElementById('myForm').action and document.getElementById('myForm')...

Getting uniform layout in both IE7 & IE8 with form elements

It would seem that IE7 puts an extra 1px of spacing above and beneath form elements. IE8, FF3.5, Chrome 2 & Opera 9.5 correctly renders these elements without the spacing. What I want though, is for the display to be the same in IE7, so is there some kind of workaround to get IE7 to correctly render the elements? It doesn't appear to m...

Expand an <a> tag to fill the space

How can I make the anchor tag expand to the bottom of the list item? I know I could put the anchor round the list item tag, but that breaks XHTML 1.0 Strict compliance, so I cannot do it. <html> <head> <style> #listWrapper { text-align:center;} #list { margin-left: 0px auto; margin-right: 0px auto; width: 100%; min-hei...

Movable Type: Show all months in ArchiveList, highlight active.

Hello there, I'm working with MT for the first time and have encountered a little problem with displaying a list of monthly archives. I'd like to display a table where every year containing entries is a row, and all months are shown as cells in each row. Months containing entries are shown with their names wrapped in a link to the corr...

CSS: max-height not working

hello, I have the following html/css code . When I have the screen resolution to 1024*768 the height is 400px.But when I change the screen resolution to 1600*1200 the height does not increase.I am using FF 3.5.2. Can anyone tell what the problem is ? <?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http...

jpg image not getting rendered in HTML.

Hi All, I have one jpg image which is getting rendered in FF but not in IE6. <img src="Image/warn.jpg" alt="aimage" /> Path is correct as this is working on FF. any clue? ...

JSP displaying single and double quotes as symbol

I have a JSP page retrieving data and when single or double quotes are in the text they are displayed as this symbol ”. JSP Code: <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>General</title> </head> <body> <h1> <%= order.getDescription %> </h1> </bod...

iPhone UIWebView epubs split page by page

It's really interesting how book reading applications like Stanza or Eucalyptus split epubs which is html by page so lines are clear and next page starts at the correct line. Does anyone has any idea how this could be accomplished? ...

invalid html (href target tag)

I've curious how this should be properly done. I ran a page im working on through the w3 html validateor and I got one error message Line 47, Column 54: Attribute "target" exists, but can not be used for this element.** <ul><li><a href="./jobops/1000 Design PM.pdf" target="blank">1000 Design PM</a></li> You have used the attribute ...