html

Vertically centering text in a list item with line-height but not 100% width

Hi, Whats the best approach to vertically center text in a li but restrict the text to less than 100% of the li width - in this case, setting the line-height on the li causes the wrapped text to have a massive line spacing (which of course with line-height you are telling it to do): ul li { height: 40px; line-height: 3em; border-...

Webmobile - Display 3 select boxes at the same time !

Hi! I have a mobile website (mainly iPhone, but Android and others too..) with a simple form. It contains three select boxes for the day, the month and the year. The iPhone automatically displays a pretty nice wheel for each one of the select boxes, but only one at the same time. Is there an easy way to display the 3 wheels (correspond...

Getting BeautifulSoup to catch tags in a non-case-sensitive way

I want to catch some tags with BeautifulSoup: Some <p> tags, the <title> tag, some <meta> tags. But I want to catch them regardless of their case; I know that some sites do meta like this: <META> and I want to be able to catch that. I noticed that BeautifulSoup is case-sensitive by default. How do I catch these tags in a non-case-sensit...

Querying an HTML page with XPath in Java

Hi, Can anyone advise me a library for Java that allows me to perform an XPath Query over an html page? I tried using JAXP but it keeps giving me a strange error that I cannot seem to fix (thread "main" java.io.IOException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd). Thank...

Play with Div using jQuery or Javascript

Hi.... I want to move specific div to up on the up link. Same as to move div to down on the down link. As shown in screenshot, same as i want to insert div before specific div on the 'IB' link. I want to insert div after specific div on the 'IA' link. To delete specific div on the 'D' link. screenshot Now of course there will be man...

jQuery: Simplest method for adding/removing a class between li elements

I have a list of links, and I would like to use jQuery to set the clicked one as active, and have the rest of them remove their class. My current setup is like this: html <ul> <li id="li_1" class="active"><a href="#" id="link1">link 1</a></li> <li id="li_2"><a href="#" id="link2">link 2</a></li> <li id="li_3"><a href="#" id="lin...

using browser logos

I'm adding a functionality of browser version detection and showing a message if the version is outdated, just like Youtube is doing for IE6. Is it OK to use the logos of all the browsers? And where can I find the logos for using in my web application? ...

Marginal CSS Attributes

How do you guys handle marginal CSS? By marginal, I mean a single word or phrase that needs italics or bolding. It seems silly to declare a 'bold' class with just Bold { font-weight: bold; } Or italics, either! Italic { font-style: italics; } But I find myself hesitating to put class like that into my css reset. <p> <span cla...

jQuery Escaping HTML from a Textarea

I want to escape HTML tags to entity names, taking text from a textarea and putting the result in a second textarea such that: <mytag> becomes &lt;mytag&gt; I'm using .html() and .text() going back and forth OK. My problem is dealing with the textarea element, which acts a little different.... It works fine if I first place the text ...

How to make a some button on web form with Action Script

I am absolute beginner in Flash, and AS3. I need to make dynamically some amount of buttons in web page. I must use Action Script and MXML. If It will be PHP I will call echo function. So help me please. ...

Do you Ajax JSON or HTML?

What is the preferred way to do AJAX. If it was for a search page written in PHP using Jquery for the AJAX How would you handle the response a) Have the response contain all the relevant html/styling or b) Send pure JSON and have a javascript function build the html/styling around the javascript variables. I can see advantages to ...

html indenting in vim

I don't know if this is possible, but does anyone know of an indent script that will support this scenario? (| is cursor) given <div>|<div> if I press enter, I want to see <div> | </div> instead of <div> |<div> ...

Problem in Google Visualization Chart Api

Hi Guys I am using GWT If You look at my code , When I click on Hide button it clear the pieFlowPanel Panel but when I click on Show button it does not show my PieChart final Panel panel = RootPanel.get(); final FlowPanel pieFlowPanel = new FlowPanel(); final Runnable onLoadCallback = new Runnable() { public voi...

Table coming on the Top of Div .how to bring the Table down

I have a div in the html and after the Div and i have another div which contains the HTml table Which is coming on the top of div .How to bring the table down . <div id='testupdate2' >Mynumber: ". $num." </div> <div id="test"> <table cellspacing=0 cellpadding=0 border=0 width="100%"> <tbody> <tr> <td id="He...

Modifying the html output of a gridview

I'm trying to modify the output of my GridView in the RowDataBound event handler, but it's not working - nothing happens. My code: Private Sub MyGridView_RowDataBound(ByVal sender As Object, ByVal e As GridViewRowEventArgs) Handles MyGridView.RowDataBound e.Row.Attributes.Add("data-xkoordinat", 0) End Sub What I expect to see: <...

CSS not equal selector

Is there's something like != (not equal) in CSS? e.g, I have the following code: input { ... ... } but for some input's I need to void this. I'd like to do that via adding class "reset" to input tag, e.g. <input class="reset" ... /> which simple skip this tag from CSS... How I can do that? Only one way I can see, it's to add so...

Good way to split data into two side-by-side HTML tables

Basically, given data like this: Col 1 | Col 2 1 7 2 8 3 9 4 10 5 11 6 12 I want to have the page display something like this: Col 1 | Col 2 Col 1 | Col 2 1 7 4 10 2 8 5 11 3 9 6 12 The purpose of course is that...

superfish drop-down displaying underneath text of another div

I had a problem with the drop-down menu displaying behind a div, but that is fixed, now it is being overlapped by the text of another div: This only happens in IE7, I imagine it does in IE6 as well, but did not test in IE6. I set the z-index of the div's it drop-downs over to z-index:1; and the z-index of the drop-down is set to 2. ...

How do I use cookies to let visitors access to the downloads page of my website.

Hi I want visitors to my website to fill out a contact form before they can access the downloads page. I am looking for online resources or examples. The only ones I can find are username and password authentication which I don't need. I am hoping to do it in PHP. At the moment my Contact form emails me their details but anyone can acce...

HTML select element onchange trigger for already selected option

I have the following HTML containing a drop down list (single selection) <script type="text/javascript"> $(document).ready(function () { $("#garden").bind('change', function() { alert("Changed"); }); }); </script> <body> <div id="...