html

Why is Text flowing inside of an image with float: left; not wrapping?

I have the following HTML <div> <img id="image1" src="http://valleywag.com/assets/resources/2008/03/BlackGoogleLogo.jpg" alt="Why doesn't this float correcly?" style="border-width: 0px; float: left;" /> <div id="divText" style="font-family: Arial, Helvetica, sans-serif; font-size: 11px;" cla...

Alternate background colors for list items

I have a list, and each item is linked, is there a way I can alternate the background colors for each item? <ul> <li><a href="link">Link 1</a></li> <li><a href="link">Link 2</a></li> <li><a href="link">Link 3</a></li> <li><a href="link">Link 4</a></li> <li><a href="link">Link 5</a></li> </ul> ...

html email with consideration for Blackberry.

Hi, I'm supporting a system which sends an automatic populated email alert. I've rendered the page using a combination of CSS and html. The alert is sent from a system called Salesforce. My problem is, I've never owned a blackberry, and don't have access to one for testing purposes, but I know the alert looks like crap on it. It seems t...

Html radio tag question

I have a jsp page with two radio tags. The page contains a struts2 form. When I submit the form one of two radio must be automatically checked. Is it possible to do that? ...

How can I send html mails with included CSS with PHPmailer?

Hi all, I have problem with sending HTML mails with PHPmailer. I make Smarty template and I got all the HTML code from it but when I send mail, I got the mail witouth included CSS (it's only background-color, font or something like that). In PHPmailer I set that the mail is HTML. Is there any way to send HTML mail with included CSS? T...

How can I use a carriage return in a HTML tooltip ?

Hi, I'm currently adding verbose tooltips to our site, and I'd like (without having to resort to a whizz-bang jQuery plugin, I klnow there are many!) to use carriage returns to format the tooltip. To add the tip I'm using the 'title' attribute. I've looked around the usual sites and using the basic template of: <a title='Tool?Tip?On?N...

IE6 Table cell alignment problem with ajax

This one is weird, I have a page that consists of a html table in a div called 'rates-viewer'. If you load this page in IE (6 or 7), you will notice that the contents of the table headers is misaligned over to the left. http://tinyurl.com/666zcv If you choose a country from the dropdown, it triggers an ajax call to a script. This scri...

Is there any java library for converting document from pdf to html?

Open source implementation will be preferred. ...

How to code html mailings?

Hello! I'm preparing to send mass email to customers which is in html + images. What are general rules to do make it display correctly in most popular mail clients? EDIT: Well it's for my customers - about few k clients. My question is - how to code this email that it will display correctly in customer mailclient(thunderbird, outloo...

Is there a way to set Tab Order in ASP.net?

I am trying to set up my tab order on the html side of my project. How do I set the tab order. Usually in visual basic, the option is in the menu bar under view/tab Order. How do I do this in asp? ...

Regex for HTML attribute replacement/addition

I'm looking for a single line regex which does the following: Given a HTML tag with the "name" attribute, I want to replace it with my own attribute. If that tag lacks the name attribute, I want to implant my own attribute. The result should look like this: <IMG name="img1" ...> => <IMG name="myImg1" ...> <IMG ...> => <IMG name="myImg1...

styling the last td in a table with css

I want to style the last TD in a table without using a CSS class on the particular TD. <table> <tbody> <tr> <td>One</td> <td>Two</td> <td>Three</td> <td>Four</td> <td>Five</td> </tr> </tbody> </table> table td { border: 1px solid black; } I want the TD containing the text "Five" to not ha...

Split HTML after N words in python

Is there any way to split a long string of HTML after N words? Obviously I could use: ' '.join(foo.split(' ')[:n]) to get the first n words of a plain text string, but that might split in the middle of an html tag, and won't produce valid html because it won't close the tags that have been opened. I need to do this in a zope / plone ...

Line break in title attribute of span

I've got a span that I'm using as a tooltip for a checkbox on a web page, and I want there to be a line break in the tooltip. None of the following have worked: <span title='This<br />is a tooltip'></span> <span title='This is a tooltip'></span> document.getElementById('mySpan').setAttribute('title', 'this\nis a tooltip'); Is this e...

Can I open a dropdownlist using jQuery

For this dropdownlist in HTML: <select id="countries"> <option value="1">Country</option> </select> I would like to open the list (the same as left-clicking on it). Is this possible using JavaScript (or more specifically jQuery)? ...

ASP.Net MVC: How to dynamically generate a meta tag based on the content of the url?

Here is the idea: When the user wants to see /controller/action, then I want the page to have a "robots" meta tag with its value set to "all". When the user wants to see /controller/action?sort=hot&page=2 (i.e. it has a query string), then I want the page to have a "robots" meta tag with its value set to "noindex". Of course this is jus...

Pass variable into an input

I made an html file called test.html then I navigated to it as "http://site.com/test.html?test1=a" but the textbox stayed blank. Why is this? Super simple code <html> <head> <title>Test</title> </head> <body > <input type=text name="test1"> </body> </html> ...

Is it possible to put text on 3d button in HTML ?

I want to use pretty 3d button images on my website. However, currently the way this works is the text is part of the image. So, when I want to change the text (or make a new button) it's a 10 minute editing chore instead of a 20 second text change. I've seen a few websites that have a blank button with text on it. The real trick is m...

How can I get desired z-index behavior from IE when using nested DIVs?

I have three DIVs, something like this: <div id="header"> ... </div> <div id="content"> <div id="popup"> ... </div> </div> DIV#header is "position: fixed" and used as a non-scrolling header at the top of the screen. DIV#content has some content in it and is "position: relative". DIV#popup is "position: absolute" ...

Best way to handle file uploads through HTTP

File uploads through web pages using the standard HTML input always seems clunky to me. If the user tries to upload a large file, it can go on forever and they get no queue that the file is actually being uploaded. I have tried to do things like provide a gif graphic that is an animated graphic bar, but it doesn't give the user any in...