Does anyone have information on browser selector speeds in CSS? In other words, how different selectors compare to each other (in th same browser).
For example, I often see (and write) code like this:
#content #elem { ...rules... }
But since those elements are unique IDs, I should only need #elem, right? This got me thinking about wh...
How can I refer to a nested div by id when it has the same id as a div nested in a similarly named div
eg
<div id="obj1">
<div id="Meta">
<meta></meta>
</div>
</div>
<div id="obj2">
<div id="Meta">
<meta></meta>
</div>
</div>
I want to get the innerHTML of meta
document.getElementById('obj1').getElem...
Does anyone know any good java library (or single method) that can strip extra spaces (line breaks, tabs, etc) from an html file? So html file gets turned into 1 line basically.
Thanks.
UPDATE: Looks like there is no library that does that so I created my own open source project for solving this task: http://code.google.com/p/htmlcompr...
I making a website with the javascript library. If the user select a option on a dropdown (select) box there must be added a label and a textbox. This I do with the appendChild option. The only problem with the appenChild option is that the items always be added after the items in used element. This is my code:
var newFreeformLabel = do...
I'm trying to horizontally center a <div> block element on a page and have it set to a minimum width. What is the simplest way to do this? I want the <div> element to be inline with rest of my page. I'll try to draw an example:
page text page text page text page text
page text page text page text page text
-------
...
Hi,
I was working on creating a layout today which goes as follows:
+----+ +----+ +----+ +----+
| | | | | | | |
+----+ +----+ +----+ +----+
Looks simple, but I have some additional specs:
The max number of columns (n) needs to be dynamic (This HTML page is generated at run-time).
The entire set must be horizontally flu...
I've got a really frustrating problem with a web application I work on (I didn't originally write it). It uses frames for the layout scarily enough. The problem I'm having is that all elements with a background colour and border set via CSS default to 100% width. I've just tested div elements, paragraph elements etc.
I removed the s...
Hello all,
I have the following problem:
I want to create a webpage in which I can use the JQuey tabs both by a side-bar and by the upper button-bar of the Jquery tabs itself. I am using the following code:
title here
$(document).ready(function(){
$("#datepicker")....
I want to create a webpage in which I can use the JQuey tabs both by a side-bar and by the upper button-bar of the Jquery tabs itself.
My code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta htt...
I have three select boxes.
<div style='float: left; padding-right: 10px;'>
<select size="10" name="company_id">
// a lot of options here
</select>
</div>
<div style='float: left; padding-right: 10px;'>
<select size="10" name="department_id" id="department_id">
// a lot of options here
</select>
</div>
<...
I am using Rails 2.2.2 and I would like to add an id to the html form code generated by the form_tag.
<% form_tag session_path do -%>
<% end -%>
Currently produces:
<form action="/session" method="post">
</form>
Would like it to produce:
<form id="login_form" action="/session" method="post">
</form>
The api isn't really a...
I have a select field within a form:
<form id="myform">
<select id="value" onchange="javascript: document.myform.submit()">
<option>....
</select>
</form>
After the form is submitted, it is impossible to use the 'back' button without resubmitting the form. However, if I use a regular 'submit' button, it is possible.
Is there a w...
Which is the more efficient way to create the following, hardcoded HTML or Javascript manipulation:
A pre-defined grid, i.e. constant number of rows and columns, with boarders and styles and event handlers. Is it better to have many divs written in HTML.
<div class='tl' id='c00' style='top:0px; left:0px;'>A</div>
<div class='tl' id='c0...
I have a feed from my Twitter profile on the top of my site but I wondered if there is a way to filter out my @replies and only show my status updates?
Thanks
...
On my page I have forms which default to .hide() when the page is loaded. These two forms are account creation and login. They are shown to the user once they click the appropriate link (.show()).
Obviously, if there is a failure with either form, I'd like for the form to stay open instead of hiding after the page loads from submitting....
I find this URL (or a similar one) always on HTML files, XML, XSD...
Like "http://www.w3.org/2001/XMLSchema" or "http://www.w3.org/2001/XMLSchema-instance"
I always wonder what those URLs means.
Even offline the XML or HTML document works without changes. What's the benefits on links to those URLs??
Thanks
...
Server: Apache
I'm looking to rewrite my urls in the following way, and I can't figure out a way to get it to work.
http://website.com/index.html
I want it to redirect to:
http://website.com/
So basically I want to load index.html, but not display it in the url. I also don't want to give it another name. I'm not looking for /index...
No matter what I set them to my DIVs I use for buttons don't resize. I'm uploading the correct file, and it has the change on the server, but nothing is happening no matter how much I refresh. I'll delete the URL so this can't be used as advertising once I get an answer.
[removed url]
...
Is there a way to lock the orientation of a UIWebView? With Obj-C, JS, or Html? I don't want to have a button or anything I just want it to be locked to portrait as soon as the app opens up.
...
Hi I would like to know if there is any other way using javascript or something to enter the user input directly to database without using POST method.
...