html

When functionalities of html attributes and css styles overlap

1) If inside CSS file we specify the following style: td { text-align:center; } While in a Html file we have <td align=”right” … > then value set in CSS file will take precedence over an inline html attribute and thus elements contained inside <td> cell will be aligned to the center. a) Is same true for all html attributes? Mean...

Clean and accesible Other option (Check box and text box)

When I have a set of either check boxes or radio buttons I often need to have an Other choice. This check box or radio button is very often accompanied by a text box where the user is supposed to fill out what this Other is. How do you usually handle this set up? What kind of markup do you use? What do you require in your validation? Do...

how to capture key repeats with javascript

i have an asp.net form and an asp:textbox. i have a problem when the user presses and HOLDS a key down. the user selects the text box and then presses and holds '9' until the text box fills with 9s. Is there any way to detect this situation? Is there a way to stop key repeats when the key is held down? ...

List of Objects to be used on ascx view with Inherits data already loaded MVC...

I have an object list being loded from a database to a drop down list. The Model loads the data to the Controller. The aspx view includes an ascx view. The ascx view already inherits data from another Project. I cannot set my List object in the ascx page. Can this be done? Model ... string List = dr["example"].ToSt...

Why is my "Page [0]" not centered in my webpage?

My "Page [0]" text isn't centered on my webpage. Anyone know why? I could really use some help please. Here is the html: <html> <head> <title>Test Forum</title> <link href="http://prime.programming-designs.com/test_forum/style.css" rel="stylesheet" type="text/css" /> </head> <body> <a href="http...

PHP Menu Question

As one of the steps toward a greater website redesign I am putting the majority of the content of our website into html files to be used as includes. I am intending on passing a variable to the PHP template page through the URL to call the proper include. Our website has many programs that each need an index page as well as about 5 sub...

I have a bunch of divs floated left, lined up in columns with different heights. They dont create a nice grid without setting a height.. JS or CSS way around it?

Hey guys, I am trying to create a grid like system with div's with content floated left. The problem is that the height of each div is not static since the content is different in each one. Since the height is different.. things get outta whack if one is taller then another in one row. Is there some sort of css way or js (prefer java...

Link on z-indexed div not a link?

I have a div behind the main div. Sometimes it appears and sometimes it's occluded, and that's fine. But the link on that z-indexed div isn't showing up as a link. Which is to say, the browser doesn't turn the cursor to a pointer; and when you click on it, it doesn't request the href document. Is there any way to keep the div so th...

How do I make textarea a TinyMCE in Joomla?

I have a component and I want to make a textarea on the admin backend interface use the TinyMCE editor: How do I reference the TinyMCE that is being used by other components (instead of duplicating it) 2.) How do I hook into the page init or some place where I can let TinyMCE do it's magic (of if Joomla provides a way) Thanks ...

Add color to selected <li> item / override <ul> style

I have navigation for which I need to set a color for the selected item. It's flat HTML and CSS. Here's the menu code: <ul id="top_navigation"> <li class="border_red"><a href="index.html">Home</a></li> <li class="border_red"><a href="about.html">About</a></li> <li class="border_red"><a href="services.html"><font color=...

switching pictures when hovering over a link choice

I am new to this. I am writing in html and I was curious if it is possible to switch to another image when the the link is hovered over. ...

How can I take the first 100 characters of html content ( without stripping the TAGS! )

There are lots of questions on how to strip html tags, but not many on functions/methods to close them. Here's the situation. I have a 500 character Message summary ( which includes html tags ), but I only want the first 100 characters. Problem is if I truncate the message, it could be in the middle of an html tag... which messes up stu...

How to URL encode this so I can pass it to Facebook Share?

This is the URL I want to share: http://mydomain.com/#url=http://stackoverflow.com Inside my site, I do this in Django so that everything will work: http://mydomain.com/#url={{external|urlencode}} However, when I pass it to Facebook Share, everything gets messed up. http://www.facebook.com/sharer.php?u=&lt;url to share>&t=<title o...

Opening new window in HTML for target="_blank"

<a href="facebook.com/sharer" target="_blank" >Share this</a> How do I make this a certain width and height, in a new window, when the user clicks on it? In firefox, the current code only opens up a new tab (not a new window) ...

Trying to parse links in an HTML directory listing using Java regex

Ok I know everyone is going to tell me not to use RegEx for parsing HTML, but I'm programming on Android and don't have ready access to an HTML parser (that I'm aware of). Besides, this is server generated HTML which should be more consistent than user-generated HTML. The regex looks like this: Pattern patternMP3 = Pattern.compile( ...

print individual tables ??

I am getting values from a database and displaying in a table. Im trying to print the results as individual . Im using the below javascript <script type="text/javascript"> function print_parent(element) { element.parentNode.className = 'print'; window.print(); element.parentNode.className = ''; return false; } </script> The p...

making the div width stretch to fit its contents

Hi, I have the following html code: <table> <tr> <td> <div id="fixmywidth" style="position:relative; height:30px;"> <div style="z-index: 2000; margin-top: 5px; height: inherit; position: absolute;"> <table style="height:inherit"> <tr style="height:inherit"> <td align="center" style...

Underline ie6-bug. Inline element in <a> tag.

There is a markup: <a href="#"> lorem ipsum<span>15</span> </a> There are styles: a{ text-decoration: underline; } a span{ background: #fff; //To clean the bottom underlining under <span> } Works in all interesting me browsers. Except IE6. The bottom underlining under <span> remains. How to solve this problem withou...

android send html mail using intent

hi friends... i have generated an html code(complete with tags) as a String... now i want to send this html code as a html to mail... my code is as below.. Intent intent = new Intent(Intent.ACTION_SEND); intent.setType("text/html"); intent.putExtra(Intent.EXTRA_EMAIL, new String[]{"[email protected]"}); intent.putExtra(Intent.EXTRA_SUBJE...

How to know when a pop-down menu needs to be closed

I'm experimenting with pop-down menus (inside floating DIVs). Making them appear with onmouseover attributes is no problem, but I'm not sure how I can make the menu close properly. I'm dealing with an image that has links mapped over it with <map>. I want people to see a menu when hovering over a link. I figured the best way to know wh...