html

How do I link h-scroll, of a table header, with the h-scroll of a table body, without linking the v-scroll of the table body, with the table header?

Hi all, Basically, what I would like is a fixed header, frozen pane, table, such as, http://www.cssplay.co.uk/menu/tablescroll.html. However, his tables have one key weakness. The header will not scroll horizontally with a body. Here is a sample, based off the link above. However, the header clearly does not scroll left and right ...

Escaping data - stripslashes, strip_tags

Why do a lot of people use both these functions on a string? I see a lot of stripslashes(strip_tags($field)); (or the other way around) Isn't strip_tags enough to filter any xss stuff and such things? ...

Jquery multiple hide show div

Hello, I have been trying to do this all day. At the end i managed to get it working. I know it is not the best way to do. Can someone please show me a better way. I need 12 altogether. It does not need to be check box either. It can be just a text. I got the idea from com/2006/12/14/using-jquery-to-show-hide-form-elements-based-on-a...

Grabbing the Value of a Form and Using POST

Would like to post the value of a dynamic selection menu when the OnChange event is called. My code is currently this: <form action="test4.php" method="POST" name="itemform"> <select name="input_name" id="input_name" onChange="this.form.submit();"> <?php while($row = mysql_fetch_array($result)) echo "<option value='".$row['i...

Units in HTML for iPhone/iPad

What CSS measurement unit should I use for the dimensions (widths, heights, margins, paddings, fonts, etc.) of an embedded HTML resource that should run both on iPhone and iPad? Or should I use alternate CSS styles for iPhone/iPad instead? I would like the content of this resource to look well on both devices, without having two creat...

How to vertical-align to x-height?

I have a line of text and a small image, which I am trying to align vertically within the line. My goal is to align the vertical center of the image with the x-height (or half of the height of a capital letter) from the baseline of the text. I can't figure out any way to do this. The closest thing that I know of is: vertical-align: midd...

How to get the dimensions/placement of HTML element(s) using jQuery?

I'm trying to get the height, width, and placement of a section of HTML code, so that I can create a <div> with position: absolute to overlay the HTML in question. Sometimes this HTML is a single element, other times it's a bunch of elements. I've tried to wrap the HTML code in question in a <span> and then use $('#spanToMeasure').heigh...

Can background image extend beyond div's borders?

Can background image extend beyond div's borders? Does overflow: visible apply to this? ...

Can a large div not trigger browser scroll bars?

I have a large div housing my background image. Generally, it will be centered with the sides going off the screen. Because it is background, I don't want scrollbars to show up on the browser- is there a solution here? Thanks EDIT: Let me clarify based on the answers: I have a large image that extends beyond the browser's boundaries...

How to read web.config APP key settings in HTML markup

I have an ASP.NET site which uses a 3rd party activeX control. I have to pass a few parameters to the OBJECT tag in the HTML page. If i hardcode these parameters into the HTML everything works. I would like to place the parameters in my web.config with app settings "key/value" pairs. My problem is i cannot read the app key setting in ...

After user signup, Firefox offers to save the password but not for the correct username

In my user signup form, I have a text field named twitter_username. After the form is submitted (for example, with the_real_shaq in the twitter username field), Firefox did this: Do you want Firefox to remember the password for "the_real_shaq" on heroku.com? Obviously I Firefox to offer to store the password for user's username on my s...

ASP.NET Form Validation Doesn't work first time

<asp:UpdatePanel ID="LoginPanel" UpdateMode="Conditional" runat="server"> <ContentTemplate> <div id="login"> <div class="row"> <div class="label"> <asp:Label ID="lblUsername" Text="<%$ Resources:Login, UserNameField %>" runat="server" /> </div> <d...

How do you find the "main" picture of a website, given the URL?

Let's say you're given http://nytimes.com How would you pull out the "main" image? The reason I'm asking is because Flipboard is able to grab the main image from a website, just using the URL. You could parse out all the image tags. But then what? ...

When to use CSS and when to do it in HTML

I try outline the pros and cons of CSS compared to tables and learn in which case to use which. Then advantages using css instead of table and files CSS is for information and tables for data (fuzzy which is which) CSS you can enlarge infinitely since it's code CSS you can make multilingual easily just input the text Also simple to...

replicating wtikay - IE - currentStyle doesn't update when it ought to

I am trying to replicate, with my own code, the history-sniffing demo seen on http://wtikay.com/ and various other places. (It's a long story.) I have something that works reliably in most older browsers (latest Safari and Chrome releases and Firefox 4 betas have a defense) -- but it doesn't work in IE7 or 8 (haven't tried 6), and I ca...

How to add onload event in div?

<div onload="oQuickReply.swap();" ></div> Can i use for this? ...

How to access css properties in javascript when applied via external CSS file?

Hi, I have a little problem. When I set the css rule using some property, say, background-image in an external .css file and then try to access it using javascript in another external .js file, it does not work. That is to say I do not get any value for document.getElementById(someId).style.backgroundImage. But when I set the css rule ...

How to make :active state work in IE?

I have a button in my html form and need to change it's background image when it is clicked using css. it works perfect in FF but it seems that IE doesnt support :active state. Here is my code: HTML: <button class='button'>Click Me</button> CSS: .button { width: 118px; height: 33px; background: url(/images/admin/btn...

xml.vim does not close tag for html automatically

When editing xml, xml.vim works great for tag close. But when editing html, it does not work. Vim version is 7.3 ...

confusion with the email newsletter

i was trying to get a newsletter done in html . is it mandatory to use while creating a newsletter email template ? what else do I need to take into account to encode the newsletter ? ...