html

Use of * selector in style sheet to reset styles

At the moment I am just resetting the styles I need at the top of my style-sheet, like: html, body, div, fieldset, form, h1, h2, h3, h4, p, ul, li { margin: 0; padding: 0; } However, I have seen a lot of times that people use: * { margin: 0; padding: 0; } That does seem to make things easier, but somewhere else (don...

WMI/VBS/HTML System Information Script

Hey guys; havin' a problem with this code here; can't seem to work out whats goin' wrong with it. All other variables seem to print fine in the HTML ouput; but I get an error that relates to the cputype variable. I get the following error C:\Users\Methical\Desktop\sysinfo.vbs(235,1) Microsoft VBScript runtime error: Invalid proced...

Vertical scrollbar for a column of unknown height

hi, im building a website that has a layout similar to http://maps.google.com: a header, a sidebar on the left and a map on the right. on the google maps website when the content of the sidebar exceeds the height of the screen a vertical scrollbar appears next to it (e.g. if you type 'restaurant' in the search box). Im trying to achiev...

What is the difference between Classes and IDs in CSS? Explain me with example of where to use

Where can i use id and classes. What is the difference between them. IS there any need that we should compulsorily use ids in our css? ...

Why the lack of DOCTYPE declaration renders <pre> with less height?

The following snippet, with or without the DOCTYPE declaration, renders the <pre> content slightly differently, i.e., the without-DOCTYPE version renders the <pre> content with less height. <!-- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" --> <!-- "http://www.w3.org/TR/html4/strict.dtd"&gt; --> <html> <head> </head> <body> ...

Will a disabled text field submit when a form is POSTed?

If I submit a disabled text field via POST, what will the resulting value be on the action page? For example, I have: <table border=0 cellpadding=4 cellspacing=0> <tr><td> <input type="checkbox" id="chk_$item" onClick="javascript:handleClick('$item')"> </td><td> <input type="text" id="txt_$item" name="addresses[]" value="$it...

ajax library that populates multiple fields

I'm trying to speed up the data entry for my awards database. My "people" table currently has five fields: peopleid first middle last display So an entry might be: peopleid 120 first William middle H. last Macy display William H. Macy Is there an AJAX library that you can suggest that would enable someone entering the data...

"a" element inside "li" element overflows the "li" element

Hi, I am trying to create a very simple "no-frills" tab using html & css. For this, I have a bunch of li elements and inside each of these, there is a "a href" element. Now, when i look at the output in IE & Firefox (after setting the styles to make the list display horizontally with proper border and everything), I can see that the "a"...

Knowing how wide a text line will be in HTML for word wrap and other applications

Do you know a good cross-browser way of knowing how wide will be a text line so you can break it exactly to fit a fixed width? Suppose you want to break a long text like so it doesn't overflow a fixed width container, but you want the line to break the closest to the border possible, so guessing where to insert s isn't a clean solution....

Converting RSS to HTML

I'm at a stage in which I did not learn internet scripting languages yet, but I do understand JavaScript enough to edit scripts I find on the web to suit my needs. Lately, I've been searching for an RSS to HTML converter, and was surprised to find out that it usually involves PHP. I don't see a reason for JavaScript to not be adequate f...

How do I replace multiple words, each hashed to an alternate word, in a HTML attribute using Perl regex?

I'm writing an HTML obfuscator, and I have a hash correlating user-friendly names (of ids and classes) to obfuscated names (like a,b,c,etc). I'm having trouble coming up with a regexp for accomplishing replacing something like <div class="left tall"> with <div class="a b"> If tags could only accept one class, the regexp would simpl...

I have HTML comments being wrapped in Li and P tags :(

I have content that is first htmlentities and then stripslashes followed by nl2br. This means a watermark at the end ends up as: <li><p><!-- watermark --></p></li> Not very useful. I have the code below to try and strip the html comments and stop it displaying but its not very good at it! $methodfinal = str_replace('<li><p><!--', '<...

Div not expanding proportional to content

I'm converting a bunch of tables into divs, the layout itself is very simple and so far it works great in both ie and ffx. BUT, when the content of a div doesn't fit then it grows out of it, and pushes everything after it down...in other works, makes a mess The layout is like this, <div class="wrapper"> <div class="left">picture</d...

Use jQuery to wrap around groups of elements

I've got a list of elements and I want to use the header divs to separate them after the pages loaded up. So the code below, <div class="header">Header 1</div> <div class='test'>Test 1</div> <div class='test'>Test 2</div> <div class='test'>Test 3</div> <div class="header">Header 2</div> <div class='test'>Test 4</div> <div class='test'>...

How to automatically reload a web page at a certain time?

I have a website that I want to be reloaded at a certain time, like 3:35pm, not after a specific interval like 5min. How do I do that? ...

Dropdown menu on a multiline list

I have an example of my problem set up here. I have had to set some li's to display: inline, so that they can occur on the same line, but now I need to add drop-down lists to them, and the drop down lists are happening on the other side of the page from where I would like them to. Do I have to position my original li's in a different ma...

If an externally included file (e.g. JavaScript or CSS) is included twice (or more) on a page will there be two (or more) web requests?

Let's say because of a conditional comment or just being careless the same included file is present for users of some browser or even all browsers. For example: <!--[if lte IE 8]> <script src="mygreatincludefile.js" type="text/javascript"></script> <![endif]--> <!--[if lte IE 6]> <script src="mygreatincludefile.js" type="text...

HTML anchor link with no scroll or jump

I have various links which all have unique id's that are "pseudo-anchors." I want them to affect the url hash value and the click magic is all handled by some mootools code. However, when I click on the links they scroll to themselves (or to the top in one case). I don't want to scroll anywhere, but also need my javascript to execute and...

If naming a form element is deprecated, how do you get the value in POST from PHP?

I only know how to get POST values via named elements, such as: <?php $value = $_POST['value']; But that would require naming my form elements, which does not validate. The invalid code would look something like this: <form id="myForm" method="post" action="#"> <input type="text" name="text" /> ...

Embed a browser in Flex

Anyone know of any documentation that would help me with trying to embed a web browser component into adobe flex. I've seen in Adobe Air that there is a Item; however, in Adobe Flex 3 for a .swf file that would be somewhere - I do not see it. Any ideas? ...