html

CSS: How to overlay images

I want to overlay one image with another using CSS. An example of this is the first image (the background if you like) will be a thumbnail link of a product, with the link opening a lightbox / popup showing a larger version of the image. On top of this linked image I would like an image of a magnifying glass, to show people that the im...

Centering entire page with CSS

Hello, I am attempting to center my entire page using only CSS and it is proving more complicated than i first expected. Currently my code works in IE but not in Firefox which makes a change. The page can be seen here. Below is the code portion involved: #wrap { width: 960px; margin: 0 auto; padding: 6px; background: #FFFFFF; } ...

Radio Button Check w/ jQuery

What would be the best way to loop through all radio buttons on my page and alert the user if one of them is unchecked for a particular question? Note: there are multiple questions on one page. <li> <fieldset> <h3>What music do you listen to?</h3> <ul class="answerList"> <li> <input type="radi...

Fixing malformed HTML in PHP?

I am constructing a large HTML document from fragments supplied by users that have the annoying habit of being malformed in various ways. Browsers are robust and forgiving enough but I want to be able to validate and (ideally) fix any malformed HTML if at all possible. For example: <td><b>Title</td> can be reasonably fixed to: <td>...

How to save a user made HTML page?

I made a drag and drop utility that make it possible for users to drag and drop elements directly on a workplace and create their page, I wound how can I save the user's work as HTML page! ...

CSS issue: link is wrongly displayed

a { color: #000; } a:hover { text-decoration: none; color: #fff; } That is the code I use. But, none of the links I have in my pages listen to this. They abide by this instead: #menu li, a{ text-align: center; display: block; float: left; margin: 0; font-family: Arial, Helvetica, sans-serif; font...

ASP.NET Datagrid HTML Output (Display)

Currently I am binding a dataset with a datagrid. ds = query.ExecuteReadQuery("select PollQuestionText as 'Survey Question', PollAnswer1Text as 'Selection 1', PollAnswer2Text as 'Selection 2', PollAnswer3Text as 'Selection 3', PollEnabled 'Status' from tbl_pollquestions") For Each row As Data.DataRow In ds.Tables(0).Rows ...

How to create HTML output without a) databinding or b) using Response.Write?

Kind of related to my other question - I've only ever used HTMLControls with runat="server" and WebControls grudgingly, preferring to have control over the markup that gets generated (including the ids of the elements, etc.). What's your suggestion for, say, iterating over the contents of a collection and generating a table or list with...

parsing HTML on the iPhone

Can anyone recommend a C or Objective-C library for HTML parsing? It needs to handle messy HTML code that won't quite validate. Does such a library exist, or am I better off just trying to use regular expressions? ...

Base tag messing with bookmark links

I have a Joomla site which uses mod_rewrite to create pretty urls. http://www.example.com/resources/newsletter However this created a problem. Including images like this: src="images/pic.jpg", it would then look for a file at: http://www.example.com/resources/newsletter/images/pic.jpg ...which obviously doesn't exist. To work aroun...

Do most web 'programmers' (not designers) use WYSIWYG editors or hand code their HTML?

When I started programming web pages, it became immediately obvious that the WYSIWYG editors sucked. The HTML output was difficult to maintain, did things in ways you may not have agreed with, completely messed up existing pages if opened, couldn't handle code in the page, and was polluted with dead or irrelevant code like <font ...></f...

Visual Studio HTML editor curly bracket annoyance

Does any one know of a way to control how Visual Studio handles curly braces in Html view? Type... <% if (true) { %> Then <% { %> And visual studio will auto format it as such. <% if (true) { %> <% } %> Not a major issue but nest a few of these using foreach and it gets messy. ...

Floated block-level element: is it necessary to set the width, if yes, how?

I've just come to think about this issue which really hasn't bothered me at all since everything works just fine. Anyway, what does the community think about the following: Say I have textboxes, dropdownlists and submit buttons. They are all inline-elements. Which means that "officially" margin, padding, width and height properties shou...

What are the advantages of using <div> elements over <table> ?

Is there any advantage of using div elements instead of tables in HTML page design? ...

Vertical center an anchor tag within a fieldset

I am trying to vertically center an anchor within a fieldset using CSS but it always appears to align to bottom. Is there any tricks to this? ...

Forcing reload of a html page after a small wait

I have a html page A and a link in the page which opens up page B in a new window. How to reload the page A on clicking and opening this link ? EDIT: I should have been more clear. Page B opens in a new window and not as a popup. The hyperlink in question has its target attribute set to _blank. Taking a clue from the answers that I go...

Jquery Load question

I want to load content via the jquery load function however inside the page that is loaded i have other links which I want to load over the top of the previously loaded content. see the link below for a simple example of what I am trying to achieve but it does not work however. Any pointers/tips would be amazing. cheers http://pastebi...

Problem with encoding after in/out of a database

I'm doing a bookmarking-system. But when I insert the fetched title "Chapter 4. Examples for advanced use of VLC's stream output (transcoding, multiple streaming, etc...)", it looks perfectly good in the database, but when I print it out again on the display-page, it looks like this: Chapter�4.� Examples for advanced use of VLC's stre...

How to move autocompleted closing tag in Visual Studio

I want to make Visual Studio move the autocompleted closing tag a word (or more) to the right. For example, given the following HTML: <p>I need to emphasize some text.</p> If I type <em> before the word "emphasize", Visual Studio autocompletes like so: <p>I need to <em></em>emphasize some text.</p> Then I need to move the closing <...

How can I make a radio button for "Other - please specify?"

I am creating an HTML form with some radio button options. I'd like to have one option as "Other - please specify" and allow the user to type something in. Two questions: 1) How can I make a "hybrid" input type of radio/text? 2) On the PHP back end, if the input has the same name attribute as the radio inputs, will the user's ...