html

How to change table cell background in Javascript

I have such table in HTML: <table> <tr> <td>Cell 1</td> </tr> <tr> <td>Cell 2</td> </tr> <tr> <td>Cell 3</td> </tr> <table> How to change cell's background on mouse move in this cell? If cursor moves away from the cell, background must stay, but if the cursor move to the other cell, it must reset background. ...

What's the point of the <option> "label" attribute?

Besides the fact that only IE7+ supports it, why would you use something such as this example? Namely: <select> <option label="Volvo">Volvo (Latin for "I roll")</option> <option label="Saab">Saab (Swedish Aeroplane AB)</option> </select> After all, 'Latin for "I roll"' and 'Swedish Aeroplane AB' are lost (i.e., only remain in the ...

CSS sticky footer

Hi, I am trying to implement a CSS sticky footer. The issue is there is a content DIV that is extending beyond its container causing scroll bars that are not desirable and the background-image hung off the page div does not extend the full height of the document. Here is my HTML: <div id="page"> <div id="header"> ...

jQuery Selectors: Grabbing a section of children that are of a given tag

Say I have an arbitrary number children (e.g. "td"s) of a given element (e.g. a "tr"), and I need to grab a given number of these (say, 4) at a given position (say, 3; td's 3 - 67, in this case). What would the best query for doing this look like? Note that I could be dealing with a potentially thousands of children, so I'd like to not...

How to parse and modify HTML file in Java.

Hello everyone, I am doing a project wherein I need to read a HTML file and identify specific tags, modify the contents of the tag and create a new HTML file. Is there a library that parses HTML tags and is capable of writing the tags back to a new file ? Cheers !!! Chaitannya ...

if a div is 100% width by default

If a div is 100% width, should I still put in width: 100%;? I look at a lot of code and it's always in there even though by default a div is 100%. ...

JQuery clone <select> element

Hello, I want to clone a <select> input in HTML using JQuery. I'm not sure how to go about it, so thought I'd ask here. Particularly interested in the best way to write it back into the document as well. My select element looks like this: <select id="options"> <option value="1">Opt 1</option> <option value="2">Opt 2</option> ...

Display a Workflow using simple Html and JavaScript

I have been tasked with displaying a Workflow. We have our own custom Workflow engine (don't ask) which defines the different workflows, steps and transitions. I have to display the current state of a workflow and then allow the user to select a failed step and retry it if he/she chooses. I'm looking for something that is as simple as...

Proper HTML alignment/sizing of two adjacent 50%-width/equal height fieldsets with a 100%-width below?

Hi - I would like to lay out an area like this: ---- ---- |A | |B | | | | | ---- ---- --------- |C | --------- where each of the three boxes is a <fieldset>. Box A and B might be populated by different amounts of items, yet they should both be the same height (the height of the one that needs to be larger). Box C should be 1...

To target=_blank or not to target=_blank, that is the question!

Should links to external sites set target=_blank? E.g. I am on www.acme.net and have a link to www.otherplace.net, should that link be: <a href='http://www.otherplace.net' target='_blank'>otherplace's website</a> or: <a href='http://www.otherplace.net'>otherplace's website</a> I was under the impression that using _blank to...

how to change the border design

Is it possible to change the border design...sorry i clicked the sent button <html> <table border="1"> <tr> <td style="padding-left:5px;padding-bottom:3px;"> <strong style="font-size:12px;">Test A : <br/></strong> Test1 </td> <td style="padding-left: 5px; padding-bottom:3px; padding-top:4px;...

Div is wrapping everything in the content and out of it.

This is weird! I'm not sure why it is doing this but the div .content-wrap, or .main-content is wrapping elements that are outside of the div....... Screenshot of it using firebug. But .main-content is isn't suppose to be wrapping the 3 columns... Heres the HTML of both. <div id="plans-wrap"> <section class="starter"> <img...

jQuery validate focusInvalid add page margin/padding?

Googled and found nothing, might be asking the wrong question but here goes. How do I add padding/margin on a element that is invalid? I'm using jQuery validate plug-in to validate user input and required fields (As well as some PHP server side validation). The fields are in the middle of the web-page so when the validation happens it...

Blackberry Web Browser (4.6.1) and display block elements

Hi, I am having real issues with the Blackberry web browser (specifically under version 4.6.1) in that I need to set an image as a clickable link, but the browser does not always recognised the full image as clickable if I just wrap an anchor tag around the image. But if I set the anchor to display:block; in CSS, the Blackberry browser...

Javascript to change links on page?

Hi all, I'm pretty new to javascript and am wondering how on a page with links to images, ie. http://www.example.com/image.jpg I can get them to be changed automatically by javascript to be embedded, ie with tag Hope that makes sense! Thanks ...

Allowing users to create pages

I would like to allow users to create pages on my site. Not full pages, but just content for the default template. I am currently using http://ckeditor.com/ then saving the content into a database. Is this the best way to go about doing this? ...

php Match and replace

Hi, I want to replace every link I find within a string, with a modified version of the string, say for example: The quick brown fox jumped over the http://www.google.com/?v=abc and http://www.google.com/?v=x_y-z I would replace (and modify) the links in this so it becomes: http://www.google.com/v/abc and http://www.google.com/v/x...

What banner rotator should I use?

I have some banners I want to rotate on my index.html. What is the usual method for rotating banners? What language (js, html etc)? Any free good rotators? Links please. Thanks ...

Javascript problem when returning function?

I have a function like this: function ban_rot(){ var bnr = new Array(); bnr[0] = "/Graphics/adv/businesscrown.gif"; bnr[1] = "/Graphics/adv/webbdesigna.jpg"; num = bnr.length - 1; i = Math.round(Math.random(bnr) * num); return '<img src=\"' + i + '\" alt=\"\" border=\"1px\" style=\"border-color:#000;\">'; } I then have a html code: <...

"Div hover" is working but not valid (yet)

I have a problem with this script : click here. Currently it's working perfectly. But if i would run this through the w3 validator it's not 'valid'. I also know why this is, it is because the entire div is within a link. I would like to make this work exactly the same, but also have it score as w3 valid. I have been struggeling for two...