html

How to ensure buttons reversed by CSS are spaced evenly?

I have a wizard-style HTML form with a row of submit buttons for the Back/Next/Cancel actions (in that order). The form can also contain a varying number of input fields, such as text fields, radio buttons, checkboxes, dropdowns (select tags), and textareas. The customer requires the "Next" button to be the default action, so that if the...

Download textarea contents as a file using only Javascript (no server-side)

I am being asked to make a "download" button that downloads the contents of a textarea on the same page as a file, with the browser's "Save As" dialog showing up. Copy/paste would do the job just fine, but it is a "requirement". Right now, I am just posting the contents of the textarea to the server, which echos them back with "Content-...

Cannot make 3 column layout work within list for IE7

Hello. I am trying to create a liquid 3 column area within a list item. To achieve this, I use the standard method of having 3 elements, of which the first two are the sides, floated left and right, and the 3rd is the content, which should sit between the two. The following HTML works fine in Firefox, but doesn't render correctly in IE7 ...

How can I put a break between two elements contained by a span using css?

I have the following HTML: <form action="http://localhost:2689/" method="post"> <span> <label for="SearchBag.PowerSearchKeys" id="Label1"> Key words</label> <input id="SearchBag.PowerSearchKeys" name="SearchBag.PowerSearchKeys" type="text" value="" /> <button id="powerSearchSubmitButton" class="...

How to control allowed HTML tags in WMD Editor?

I am trying to some-how set the valid HTML tags and attributes users would be able to use in WMD Editor in my site. For example, I want to forbid the user to directly set the font size, color, typeface and so on, which is trivial to do with the default settings typing something like: <span style="font-size: 45px; color:#FF0000">Some int...

What image type should I use when? GIF, JPG or PNG?

I am trying to create a personal home page for myself to learn more about web design (JavaScript, using Photo Shop, etc). I plan on having a graphical menu on the left, a banner across the top and also a "Photos" section where I can display photos of various pictures I have taken. However, when I look at other sites that do anything sim...

Freeware Plugin to View HTML source generated by ASP.NET?

Are there any freeware plugins that would help me view the HTML Source generated by ASP.NET? ...

Javascript disabled best practices?

I would like to know if anyone optimizes their web pages to have some friendly behavior if the user has Javascript disabled. Are there any tricks to provide some pseudo-scripting behavior in such instances? I'm talking basic things like opening links in new windows. I would imagine there is still a lot you can do without Javascript. ...

View all link within <h1></h1>, need to set style on it, to make link small

I am trying to make the "view all" link to the right of each h1 header to be smaller. .view-all a:link, .view-all a:visited { text-size:.5em; } <h1>Student Activities <span class="view-all"> <a href="/student_activities/calendar/" title="view all"> view all</a></span></h1> Any help is appreciated as to what I am doing wrong. All...

PdfSharp, GDI+ and HTML printing

I currently have a "PrintingWebService" that I call from an AJAX page with all the information that is needed to construct a highly customized PDF printout using PDF Sharp and the PDFSharp's GDI+ mode, which takes DrawString and other commands that work basically just like GDI+ only they are drawn to the PDF. I then save the PDF file to...

Why are these Div tags not nesting properly?

If anyone can give any insight here it would be very much appreciated. I want to create output that shows reservations in fitness classes on various dates. The idea is to have three across and however many rows are needed to cover all of the dates. To do this, I'd like to use CSS rather than resorting to tables. Ok, so I have the follo...

When encoding HTML input for security, how do I avoid encoding international characters like Ñ or ñ?

I have a textarea in an ASP.NET MVC Application where the user can type some text. When I show the text to the user, I use Html.Encode to prevent malicious input. The problem is that the user can type in Spanish and maybe he types año and the Encode transforms this into a&#241o. How Can I prevent this? EDIT: In the generated HTML, I see...

How can I find html elements that contain specific text in an html comment?

I'm trying to use jQuery to identify <td> elements which contain specific HTML comment text. The standard ":contains" selector doesn't seem to be looking into the comments. My context here is that I want to dynamically add some content to that same td element. Here's a sample of the target td: <TD valign="top" class="ms-formbody" wid...

How can I achieve a consistent layout in all browsers?

Hey, I'm near ending the repetitive alarms at my little learning project. It's still full of bugs, but as it is a weekend project I'm correcting them slowly. My problem is inconsistency of layout across browsers. At the moment, I'm trying to improve the "My Alarms" box after login (Just don't try to hack my website, it's still very u...

Why does the floated span drop?

This code will work fine in Webkit (chrome) but not in firefox, where the second span will drop, do you know why? <div id="sbar"> <span id="status">Some Text</span> <span id="mlog" style="float: right;">Some text in the right</span> </div> ...

What's the best way to get a list of the contents of a specific group of DOM elements in javascript?

The basic scenario: I've got a series of elements on an HTML page, generated dynamically. (Currently, they're all divs, but they don't need to be.) What I want is a javascript function that will loop though all of those divs (or whatever) looking for the presence of a specific value. What's the best, most cross-browser way to do this?...

Website Header in HTML

How do I create a webpage with a header, content, and a footer. I am using TextEdit on my Mac and saving the file with a .HTML extension. ...

Are there any CMS editors out there which users can populate locked down HTML templates with content and submit, but in a very, very stripped down way?

Hi there, We work in email marketing, creating HTML/TEXT emails for clients. In essence we design HTML email templates for our clients. Clients then post us content (via a form) to populate these templates before we send them out. Right now we do this manually, basically cutting and pasting the content from their submitted form into t...

Should I avoid using jQuery selectors on CSS classes that are defined in style sheets?

I am concerned with using CSS classes that are defined in style sheets with my jQuery selectors. The reason for this is when a CSS class is defined in a style sheet there are many reasons for a developer/designer to change the name of the class or how it is used in the html that is detached from the jQuery selector that also uses the cla...

Duplicate html in a ASP.NET project

I have some HTML that will need to be duplicated in a number of places. If I externalize this to a text file and include it in the ASPX page, it would work but I will need to pass a parameter to this HTML (ClientID) Without having to create a User control, is there a lighter way of doing this? ...