html

Unwanted padding-bottom of a div

Here is my html: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"&gt; <div style="border:1px solid red; float:left; padding:0;"> <img src="xxx.jpg"> </div> I don't know why the div contains some padding-bottom even I set padding:0. If I remove DOCTYPE, this problem will not occur. ...

Open source java library for HTML to text conversion

Can you recommend an open source Java library (preferably ASL/BSD/LGPL license) that converts HTML to plain text - cleans all the tags, converts entities (&,  , etc.) and handles <br> and tables properly. More Info I have the HTML as a string, there's no need to fetch it from the web. Also, what I'm looking is for a method like this: ...

Is there any way to echo out <p> styles in PHP?

Basically, i would like to echo out something along the lines of <p style="color:FFFFFF">, or possibly a class, but it seems the parser isn't really liking the fact that it contains quotes, and it quickly destroys my site. Is there any hack to get around the parser rules, alternatively a better solution? Cheers. ...

reverting a css styled form element back to default browser style

I want to have a default Firefox selectbox, but unfortunately I have a css instruction (which i can not alter or remove) that gives all select elements a background and border. Which makes Firefox transform the nice default control to an ugly squared one. Is there a way to remove/revert those instructions? select { background-color:...

Is there a good, free raw HTML editor with auto-complete, auto-formatting and syntax highlighting?

I'm used to Visual Studio, so in an ideal world I would like something that meets the following criteria: Lightweight CSS auto-complete HTML auto-complete CSS auto-formatting HTML auto-formatting Syntax highlighting Notepad2 has syntax highlighting, but no auto-complete and no auto-formatting. Any thoughts? Please don't answer with ...

On the iPhone, how do i parse a html page to get all the RSS links?

in html an rss link looks somewhat like this <a class="rsslink" href="http:the_url">The feed title</a> i would like to get all links that match this description from a html page that has a list of rss feeds. anyone know of a good way to parse, with some sample code? ...

Popup using jQuery?

I'm trying to do a pretty simple thing, I believe. I need to popup a success confirmation dialog after a user clicks to add someone to his friends list. Simply there's an add link on the page with the url (mysite.com/add/friendname). I needed to make issue this request asynchronously so I used jQuery.ajax built-in function to send the re...

Jquery Accordion - Manual Activate

Hi Guy, I am using the Jquery Accordion plugin. I would like to when the page is loaded open a certain panel. I am trying to this like so, by identifying it by ID: selected = $("#1") $('ul.accordiontasks').accordion( { autoHeight: false, active: selected }); This does not seem to activate the accordion panel with the ID...

Embedded images in HTML email not displaying on mobile phones

I have an application that sends an HTML formatted email with embedded images. The email looks perfect on many different desktop/web clients. When the email is viewed on a mobile phone that supports HTML email (tested on iPhone, WinMo 6.1) the images are displayed as red 'X's. All other HTML is being displayed correctly. To be clear,...

Does Window-target meta tag work for busting frames?

Does adding the followin tag in the header section of a html document prevent the loading of the document within a frame? If so, why does anybody bother with Javascript methods? <META HTTP-EQUIV="Window-target" CONTENT="_top" /> ...

Query String for pre-filling html form field

I manage a website for an organization that has separate chapter sites. There is a membership signup form that is on the main website that each chapter links to. On the form there is a dropdown box that allows a person to choose the chapter they want to join. What I would like to do is have each chapter website use a specific link to ...

Spark View Engine Html.TextArea Bug?

I have a weird one. I'm trying to render out a standard textarea simply using the TextArea helper: <p> <label for="Message">Message:</label> ${ Html.TextArea("IssueText") } ${ Html.ValidationMessage("IssueText", "*") } </p> And my controller public ActionResult Contact() { return View();...

Example of a fieldset tag in HTML

Does anyone have good examples of how to use a fieldset tag in HTML? ...

WCF service to return iCal

How do I get my service written with WCF to return an iCal? The examples I see use either xml or json as the way to format the response. What is the best way to return other types of response bodies? ...

CSS DIV doesn't resize its height

Hello guys, I can't put this to work like it should, I'm not that good with CSS, I need you help! I have a page like this: <html> <head><title>title</title></head> <body> <div id="page"> <div id="container"> <div id="head"><img src="..." alt="..." /></div> <div id="content"> <div id="menu"><ul><li>...<...

Is there a way to insert Html into a gridview row?

Using aspnet 3.5, c# - Is there a way to insert Html into a gridview row? ...

ASP.Net, Master Pages : style-sheet per page

Those are might assumptions, are these correct? Layout using CSS is preferred over using tables. CSS ishould be extracted in a separate file, rather than in-lined. CSS are imported (linked) from that is located in the site.master, therefore all .css are imported for (and apply to) all .aspx pages. Given that, I have a proje...

List of URL tags in HTML/JS/CSS

I need to replace all URLs within any website, also realtive URLs like /imgages/. Therefore I need a list of tags that can contain URLs which a browser would download such as href=, src=, url(). Are there any additions for HTML/CSS/JS? ...

Detect when a <div> shows or hides a scrollbar

Is there a way to detect when a div shows or hides a scrollbar? When the scrollbar is showing, I want to resize some controls inside the div, so that the scrollbar won't cover them up. So, I need an event that fires when the scrollbar appears and dissapears. Thanks, Brian ...

Stuck with Simple Html Dom and extracting information

I'm trying to use simple html DOM to extract everything inside a tag with the class "sitepoint". Here is my code that doesn't work: <?php include_once('simple_html_dom.php'); $html = file_get_html('examplewebsite'); $ret = $html->find('.sitepoint'); echo $ret; ?> Below is an example of one of the sitepoint tags (there are ten or so)...