html

Problem with CSS DIV align

If the doctype declaration is <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN"> what is the best way for horizontal alignment of the DIV's like these: <div id="outer"><div id="inner">Some text</div></div> The CSS is: #outer{ border-top:1px dotted #999; background-color: #F4F4F4; width:100%;} #inner{ width:500px;border...

How do you make a wrapped div fill the window horizontally?

I have a div which is contained by another 960px-wide centered div. I'm adding a background to the inner div which should expand all the way to the window's edges horizontally, essentially escaping the boundaries of its container. If I apply a large negative margin and equal amount of padding, this works on the left side, but the right s...

Java Html Parser and Closing Tags

How do I handle closing tags (ex: </h1>) with the Java HTML Parser Library? For example, if I have the following: public class MyFilter implements NodeFilter { public boolean accept(Node node) { if (node instanceof TagNode) { TagNode theNode = (TagNode) node; if (theNode.getRawTagName().equals("h1")) { return true; } e...

Vertical Aligned Text and Image in list

Is there a way of vertical aligning text and an image in a list? e.g. <li>Some text here <img src="image.jpg" alt="" /></li> The text doesn't align in the middle of the side of the image, it appears at the bottom then the image is next to it. I need the text to be in the center point between the image on the side. What's the best w...

Background image help (Solved)

thanks for help, ended up with this html{ position:relative; min-width:950px; height:100%; background:black url(images/GrassBG.png) repeat-y top center; font:13px "Lucida Grande",Helvetica,Arial,sans-serif; } body.main{ width:950px; margin:0 auto; position:relative; } is there any way when using a d...

Simple example of popup authentication with Facebook Graph API

Trying to get Facebook to authenticate my users via a javascript popup. Right now, I have: <input type="button" value="Connect with Facebook" onclick="window.open('https://graph.facebook.com/oauth/authorize?client_id=XXXXXXXXXXX&amp;redirect_uri=http://example.com/step2&amp;display=popup')" /> But when the user logs in via Facebook,...

HTML is not being interpreted after JQuery's .ajax function

Hello there... Once I have retrived an HTML string with the $.ajax function I put it into a div... the HTML is a simple message with a <b> tag, but it's not being interpreted by the browser, I mean, the <b> is not making the text bold. Here is what I do: $.ajax({ url: 'index.php?ajax=ejecutar_configuracion&id_gadget=cubrimientos',...

ASP.NET anchor tag with runat="server" acting weird

I have a strange problem with the page I'm designing. I have a link like this: <a id="asel1" runat="server" href="#"><img id="isel1" runat="server" src="/Images/selbar/1.jpg" /></a> And when I view source on the resulting page I get this: <a href="../Cards/#" id="ctl00_ContentMainSection_CardsControl1_asel1"><img src="/Images/selbar...

Is it possible to dump JavaScript errors to a div in HTML?

I'm writing a game and I've got a console for developers to interact with JavaScript methods in the game. I have a problem though; I can't figure out how to drop JavaScript errors to the console. Is there anyway to write errors to a div or HTML element? ...

Displaying code with <pre> tags.

Currently I'm using <pre><code> code here </code><pre> to display code. I'm pulling this information from a DB for a blog. The problem I'm having is that some of the code isn't showing. For example, in the source code I have this: <pre><code><br /> echo '<ul class="mylist"><li><ul class="left">'; foreach($nameArray as $name) { i...

Simple Javascript Won't work

Dear Experts, I was testing some code and I became very frustrated as I couldn't even get an simple DOM alert box to work Anyway here's the code <!DOCTYPE HTML PUBLIC "-//W3C/DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/tdt/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <script type="...

document.body.scrollTop is always 0 in IE even when scrolling

I am displaying the value of document.body.scrollTop in the status bar while moving the mouse. The value is always 0 in IE. Why is always 0? Is there another way to get how much the scroll bar has moved? ...

IIS 6.0 .htaccess

You can 'fake it' .php being a .html file using .htaccess: AddType application/x-httpd.php .html .htm how can i do this in using IIS 6.0? ...

javascript disabling a div or a link? (for a 5-star rating system)

Basically, I've created a 5-star rating system. Pretty typical. It shows how many stars other people have given the item, and then when a user hovers over the stars, it lights up x number of stars based on how many they're over. It's all run by AJAX. They click 5 stars it automatically adds their 5-star rating to the group. The problem...

Parse <li> list with C++

I have webpage I downloaded with C++ to a string, and it is basically a massive <li> list of links. I need to find the last 2 elements of the list. Can anyone help me on how to do this? ...

css formatting problems

So I wanted to mess around with Sass so I created this tiny incredibly simple little page. For reasons unknown to me when I add a top-margin to #content it effects my wrapper div instead. Any information as to why this is happening would be greatly appreciated. Thanks! Here is the page live: http://cheapramen.com/omg/ html: <!DOCTYPE ...

HTML to Text Conversion

Internet Explorer has an option to save a web page as a text file, with all the tags removed. I need a way to batch process that stuff for a project at work. Or there any command line utilities or libraries that can do the same thing for me? COM-interop with IE(not my first choice!)? It doesn't have to format exactly like IE, just give m...

HTML/JavaScript: mouseover effect for image maps?

I'm trying to help out a nonprofit by doing their website. They want (ugh) their logo to serve as an HTML image map. In other words, when you click on different parts of the logo, you're directed to different web pages. They also, however, want mouseover effects: when you mouseover a particular portion of the image map, that piece of the...

Combine two content encodings sections in a single page

I developed a web application that allows users to modify existing web pages. When a user type a url of an existing web page, I read the content of this page and using an ajax call, i display the content in a div inside my web application. Now my problem is that often the content encoding of the existing web page is different than my web...

CSS IDs and nesting tags with Haml

I have the following code in my CSS file, which isn't working. #home table th td { border:1px solid black; padding:2px; } In my index.haml file, I have: %div{:id => "home"} %table %tr %th Your Account %tr %td #{link_to 'View my profile', @profile} %br #{link_to 'Edit my profil...