html

Position absolutely positioned DIV relative to (also absolutely positioned) parent DIV?

This is one problem I always have when i'm fixing layouts. I've got a absolutely positioned DIV, I place a child-DIV inside which also needs to be absolutely positioned. But I really want this child-DIV to behave relative to the parent... Is this even possible? Or do I need to create a wrap-DIV? <div class="container" style="position:re...

Portable HTML/CSS for vertically aligning an input of type=image with an input of type=text?

I'm attempting to make a form like so, with horizontal layout: <form id="foo" name="foo" method="post" action="fooaction"> <p>Enter a foo: <input type="text" id="fooText" name="fooText"value=""/> <input type="image" name="yes" id="fooSubmitYes" value="1" src="yes.png" title="Yes" width="24" height="24"/> <input t...

Pass mouse events through absolutely-positioned element

I'm attempting to capture mouse events on an element with another absolutely-positioned element on top of it. Right now, events on the absolutely-positioned element hit it and bubble up to its parent, but I want it to be "transparent" to these mouse events and forward them on to whatever is behind it. How should I implement this? Click ...

Enter key press behaves like a Tab in Javascript

I'm looking to create a form where pressing the enter key causes focus to go to the "next" form element on the page. The solution I keep finding on the web is... <body onkeydown="if(event.keyCode==13){event.keyCode=9; return event.keyCode}"> Unfortunately, that only seems to work in IE. So the real meat of this question is if anybody...

How can you swap an input text field to a password area on focus in JQuery?

I would like to display "password" as text in the password area, and when focused the box should become empty and allow normal password (starred out) input from the user. Currently I use the following method. Initially I display a text field showing password, when focused it is removed and replaced with a password field. Here is the jQu...

Tools to convert html layouts to Silverlight 3.0

I have a couple of applications for clients that were dragged into the web kicking and screaming. I'd like to take a crack at moving some to Silverlight 3.0 if even just as a proof of concept exercise. I'd like to see if I could make them full apps, layout and all. I think the layout of the web app along w/ the graphics is good and do...

Adding a custom style to content editor

I have the standard content editor that uses an iFrame as the text area and then onchange of dropdowns it performs: idContent.document.execCommand(cmd,"",opt); where "idContent" is the iFrame. One of the dropdowns is supposed to be style but it performs a "formatBlock" command. I have a custom style sheet. Is there a way for me to p...

Force link to mp3 file to download/save-as

I have links to mp3 files on my website (normal <a href="file.mp3"> tags). But for many users who have QuickTime installed, it will open the mp3 files rather than "save" them when you click on the links. Can you force the browser to save the link rather than using the browser preference? I can use JavaScript or C# .NET but I'm looking...

CSS Framework - off the shelf or homegrown?

Is there an existing framework that satisfies the needs of your projects with minor modifications, or have you developed your own along the way? What do you recommend for someone trying to make that decision with these priorities: CSS reset Attention to typography; baseline grid Semantic classes Accessibility Lots of "Helper" classes: ...

HTML input arrays

<input name="foo[]" ... > I've used these before, but I'm wondering what it is called and if there is a specification for it? I couldn't find it in the HTML 4.01 Spec and results in various Google results only call it an "array" along with many PHP examples of processing the form data. ...

HTML Div height problem

I have two div element in my page aligned vertically. content of one div is fixed, but the content of other div varies so its height. i want to make both the div of same height. how can i do that?? ...

What is the use of style="clear:both"?

I happened to see a div which had the style clear:both! What is the use of clear in style? <div style="clear:both"> ...

Internet Explorer: set css class on tablerow?

Hi, UDPATE I was passing the along with an AJAX response. Seems like IE doesn't like 'new' CSS... Works fine if placed in stylesheet or initial page request... internet explorer doesn't seem to react on classes set on tablerows. Is this correct? If so is there a workaround? Or am i doing something wrong? <style type="text/css"> t...

HTML, CSS, Javascript - Problem with hiding/showing elements

I'm using the Blueprint CSS grid for my HTML page. I have a table which I want to show/hide - linking it to a button, using jQuery. The problem is that everytime I click on the button to show/hide the table, everything on the page shifts slightly left-right. Is this a common problem? Does anyone know what could be causing this and what ...

Why doesn't my background stretch behind my contentbox?

I cannot get the background to stretch behind the contentbox. The strange thing is, it works with Internet Explorer, but not with Firefox. I hope it is enough to give you a link, since I do not know where the problem is in the code, it would not make much sense to post the whole code in here. http://www.yiip.de/arbeit/testlayout/sta...

Load options for listbbox from Mysql to listbox, controled by other list - Javascript

Hi guys. I don't know the name for this, if did i would search for it. I wanted something like this, i think its uses javascript but I'm not sure how to do it know. In a web page you have 2 listboxs, its content comes from mysql. There is 2 tables in the database, for each listbox, they are both related. Then when you select a item f...

How do I configure Emacs html-mode to behave like TextMate's default HTML bundle?

A friend of mine is considering switching to Emacs from TextMate. He is used to TextMate's default HTML editing mode which has 4-space tab stops and inserts tab characters (i.e. it does no auto-indenting by default). It also allows completion of open HTML tags with "Cmd-Shift->". Any ideas? ...

Where should I declare JavaScript files used in my page? In <head></head> or near </body>?

I was reading a tutorial and the author mentioned to include Javascript files near closing body tag (</body>) in HTML. I was wondering for what type of functionality I should not declare/define JavaScript include in the head section? It makes sense to me include JavaScript like Google Analytics near the closing body tag. Where should I...

Mapping computed CSS styles to specified ones?

Is there a way to map the computed style of a dom element (as retrieved by window.getComputedStyle) to a corresponding CSSStyleRule in document.styleSheets? My ultimate goal is to retrieve specified values for dom elements (rather than computed values or actual values). ...

Fix HTML Page Element Relative to Browser Chrome

I'm trying to position a div at the top left corner of the page, and I want it to stay there regardless of browser window resizing or page scrolling. How can I do this either with plain CSS (if possible), or with jQuery? ...