html

CSS div style - should I use class or id?

I have a repeater of div's that look a little bit like this: <div class="header_div"> <!-- Content --> </div> I want to have the background color of the divs change based on a dynamic property of the content of the div (lets call it the category), but I still want the "header_div" style to be assgined in cases where I dont have a ...

Looking for an ebook based on HTML (and possible with CSS)

did a search but it brought a ton of results but not any that actually suggests a book Anyways, trying to learn website design this summer. So i registered a free site. I want to have a good source that i can read along while working on this site... So what are some good books (available online) for html? ...

Improving my regular expression skills

I've been wanting to improve my regex skills for quite some time now and "Mastering Regular Expressions" was recommended quite a few times so I bought it and have been reading it over the past day or so. I have created the following regular expression: ^(?:<b>)?(?:^<i>)?<a href="/site\.php\?id=([0-9]*)">(.*?) \(([ a-z0-9]{2,10})\)</a>(...

Parsing HTML and pulling down a drop down.

I am writing some code that connects to a website, and using C#, and System.IO, reads the html file into my application, and then I continue to parse it. What I am wanting to do now is, there is a drop down (combobox) on this site, that has 2 static values. I am wanting to have my code pick the 2nd option in the combo box and then pars...

How can I bump down an inline image by 1px but not the rest of the line?

I am needing an inline image to position 1px below baseline. How can it be done? Thanks Mike ...

jQuery, dynamic name change of radio button

Looking for something like: $("input:radio:checked").previous("name", "original_name").attr("name","new_name"); I tried a few different seen around here but mostly get the error: Object Expected Any help is appreciated. ...

Our client doesn't like pop-ups, what should we do?

Besides showing and hiding a <div>, are there any better solutions or replacements to a javascript pop-up windows? Thanks! ...

How to make the HTML link activated by clicking on the <li>

I have the following markup, <ul id="menu"> <li><a href="#">Something1</a></li> <li><a href="#">Something2</a></li> <li><a href="#">Something3</a></li> <li><a href="#">Something4</a></li> </ul> The <li> is a bit big, with a small image on its left, I have to actually click on the <a> to activate the link....

Issue with selectors & .html() in jquery?

The function associated with the selector stops working when I replace it's contents using .html(). Since I cannot post my original code I've created an example to show what I mean... Jquery: $(document).ready(function(){ $("#pg_display span").click(function(){ var pageno = $(this).attr("id"); alert(pageno); var data="<span id='page...

How do I properly create an HTML class?

I'm working on an HTML class in PHP, so that we can keep all our HTML output consistent. However, I'm having some trouble wrapping my head around the logic. I'm working in PHP, but answers in any language will work. I want the class to properly nest the tags, so I want to be able to call like this: $html = new HTML; $html->tag("html...

Selecting value of <select> tag in javascript. problem

Hello. I have an external Javascript file and i am trying to alert the value of select tag. My <select> code looks like this: <select id="vote"> <option value="1">1</option> <option value="2">2</option> <option value="3">3</option> <option value="4">4</option> <option value="5">5</option> </select> <input typ...

Set selected option via CSS?

Is it possible to set the selected attribute of an option tag via a CSS class? I'm wondering if something like the following is possible in a stylesheet: option.selected { selected: true; } Then in HTML: <option class="selected"> Which would have the same effect as setting the selected attribute. Is this technique possible? ...

Good html resources anyone?

Possible Duplicates: What are some good HTML beginner tutorials? What are some good websites for learning HTML? I would find some good resources for learning some more html very usefull. I would appreciate some leads. :) thanks! ...

Son of Suckerfish CSS Menu - Sub menu's not displaying below menu item

I have a Son of Suckerfish menu set up, but when I hover over the menu item, the sub menu appears on the left of the screen, rather than directly below the item I hovered over. eg http://blacktownworkersgroup.worldsecuresystems.com/bwc09/events When you hover over 'Events' the sub menu is supposed to appear below this item. It's work...

Unexpected results with C# recursion method

I've got a fairly simple method which recursively removes begining/ending html tags class Program { static void Main(string[] args) { string s = FixHtml("<div><p>this is a <strong>test</strong></p></div>"); Console.WriteLine(s); } private static string FixHtml(string s) ...

CSS to recreate LI with bullet, but without using a LI

I'm trying to create a layout that looks like a LI with a bullet, but that doesn't use a LI. I can't use a LI because I want to allow different items in the same list to have different bullet images. And from what I can tell LI bullet styles can only be set in the UL, so all LI in the same UL must have the same bullet image... and I don'...

styling a disabled combobox in internet explorer

Say I had the following: <select disabled="disabled" style="border: 1px red solid; color: black;"> <option>ABC</option> </select> Firefox renders the above with a red border and black text as I expect; but IE does not, it seems to be using native colors for the border and the disabled text. Is there any way for me to be able to style ...

Avoid same Javascript / CSS file load on different pages of a website

We have multiple pages on a website which require many of the same Javascript and CSS files. How do we avoid those files being downloaded again if it has already been downloaded by the user browsing some other page? ...

How to mimic a standard html text rendering on iphone?

I have a view with two UITextView elements in it, each of which is tied to an outlet in the controller. The content for these is coming from a database, and is sometimes short an other times long. I want it to look like it would in html, with <p>content1</p><p>content2</p>, such that the distances from the end of content1 to beginning o...

JavaScript form submitting using an image is not working

Hi I have a FORM that I want to use an IMG, instead of an input button, to submit the form. The code: <form> <input class="form_grey" value="Enter in City or Zipcode" type="text" id="city-field" name="city" onfocus="this.value='';" /> <a href="javascript:document.form.submit()"><img src="/images/btn.png" /></a> </form> When I ...