Suppose that I have a <div> that I wish to center in the browser's display (viewport). To do so, I need to calculate the width and height of the <div> element. What should I use for maximum browser compatibility? Looking for a solution that works on IE6+, FF2+, Opera and Webkit-based browsers (Safari 3+, Google Chrome).
...
I am designing a web site but it is behind a firewall and such services like http://validator.w3.org/ will not work.
Are there any free apps I could run on Windows or Mac OS X that will validate html and css?
...
I have a table like this:
<table>
<tfoot>
<tr><td>footer</td></tr>
</tfoot>
<tbody>
<tr><td>Body 1</td></tr>
<tr><td>Body 1</td></tr>
<tr><td>Body 1</td></tr>
</tbody>
<tbody>
<tr><td>Body 2</td></tr>
<tr><td>Body 2</td></tr>
<tr><td>Body 2</td></tr>
</tbody...
Are there any Web page designing software out there that allow me to drag and drop controls just like desktop applications. I found it quite difficult to design a web page using the designer in Visual Studio 2008 as it constrains me to a flow or grid layout. (I am not an accomplished designer but there should be some ease as one experien...
Hi,
I'm trying to find an editor (or some simple JavaScript - preferably jQuery) that will allow me to edit the contents of a textarea.
I don't want it to be rich text or WYSIWYG; I just want to be able to select a bit of text, click a button/link and have some simple HTML tags that I define put either side of the highlighted text. I a...
I need to display external resources loaded via cross domain requests and make sure to only display "save" content.
Could use Prototype's String#stripScripts to remove script blocks. But handlers such as onclick or onerror are still there.
Is there any library which can at least
strip script blocks,
kill DOM handlers,
remove black l...
Hello,
I have some questions about basic CSS that I was unable to understand or find an answer for.
First, I tried placing 3 div tags within another div tag. The first main div tag containing the 3 other tags had nothing set for it except a size, which was 400px by 400px. Of the other 3 divs inside, all were 20px by 20px, and 1 was ass...
Hello,
I am trying to have one one layer, and center images within. I.E., if I have 3 images and want 3 links beneath them, is there a way to do this without using a separate div tag for each link and image? To automatically make the links be centered under the images, and the images to be spaced evenly within a layer?
I was also wond...
Hi,
What is the way of seperating Line-Breaks and Space in MultiLine Textbox or Html Text are while inserting database(Asp.Net).Forexample what should i do if i want to insert
Hello
World
to database with line breaks?And Also While displaying what should i do too?i dont want to use Editor for it.
Thanks for ur Help
...
Lets say I am currently at:
http://site.com/folder/page.html
Is it possible to create a relative link on this page that points to http://site.com/folder/ without specifying anywhere "folder"? (And using only HTML)
UPDATE:
As it turned out "./" works only in non-strict doctype mode, while "." works in both modes, so it is still a better...
I have a vertical menu in my system which is basically made of HTML ul/li with CSS styling (see image below). However I don't want the li items which are wider than the menu to wrap, I would prefer them to overflow with a horizontal scroll bar at the bottom of the menu. How can I do this in CSS?
...
Is there any way to force Text-Mate to use a two-space tab instead of a full tab when editing HTML (Rails) documents?
...
I want to, from JavaScript, access as a variable the file that is loaded as an image in an img tag.
I don't want to access its name, but the actual data.
The reason for this is that I want to be able to copy it to and from variables so that I can , among other things, change the image without reloading it.
Can this be done? If so, ho...
Hello,
I have the following code
<html>
<head>
<title>Test</title>
<style type="text/css">
<!--
body,td,th {
color: #FFFFFF;
}
body {
background-color: #000000;
}
#Pictures {
position:absolute;
width:591px;
height:214px;
z-index:1;
left: 17%;
top: 30%;
text-align:center;
}
#Link...
This is the HTML:
<div id="testBlue">
<span>hello</span>
<span id="testGreen" class="testGreen">hello2</span>
</div>
If I have set in CSS:
#testBlue span { color:Blue; }
.testGreen, #testGreen { color:Green; }
How can I override the general style in the second SPAN?
I have tried both id and class selectors but it doesn...
Hi,
I’m writing pl/sql procedure that exports data from Oracle to Excel. I need data formatting so I can’t use CSV. I’ve already tried with XML but it generates too large files when I want to export e.g. 70000 rows with 50 columns (almost 300 MB!!!).
That’s why I decided to use HTML tags to generate XLS file – it is smaller than XML a...
i need to to some (technically awful but still good looking) table designs for blackberries that have all css support disabled.
i don't seem to find out how to get my links to display as follows without css:
<style type="text/css">
a.hover {
border:0;
}
a {
text-decoration: none;
}
</style>
is it even possible, just using html?...
I have a server-side web service that serves to multiple clients. Clients include web browsers, iPhone, BlackBerry, Android etc. My question is, I need to be able to generate dynamic content for views to these clients. Be it a full blown HTML template, an HTML snippet, JSON, XML, etc. Depending on the user-agent of the requesting client,...
Hi,
I have a collection of HTML documents for which I need to parse the contents of the <meta> tags in the <head> section. These are the only HTML tags whose values I'm interested in, i.e. I don't need to parse anything in the <body> section.
I've attempted to parse these values using the XPath support provided by JDom. However, this i...
I am working on an app for doing screen scraping of small portions of external web pages (not an entire page, just a small subset of it).
So I have the code working perfectly for scraping the html, but my problem is that I want to scrape not just the raw html, but also the CSS styles used to format the section of the page I am extractin...