html

Site wider than browser without horizontal scrollbars

I've got a site that I am working on that has greebles on the top left, top right, bottom left and bottom right corners. The full width of this is roughly 1100px. The actual content area is within the 960px layout. I want the site to be properly centered right down to 960px, with the extra imagery disappearing out the right and left...

IE 7 acting strange or is it just me.

Hello everyone I have a html like this: The idea is that divs are floated left and when there are more than 3 divs. The next one shoud start at the next line. (Because of the width). This works in almost all the browsers. Even in IE6. But when it comes to IE7. It puts the 4th div on the same line. Any ideas why? <div id="content"> ...

Is the content between anchor tags (a) in html seen as a branch in lxml?

I am trying to get some content in html documents. Some of the documents have a table of contents that very nicely indicates where in the document the content I want to strip out is located. That is either the value or text_content of the tag are easily identifiable and point to what I need. For example I might have two anchor tags in...

How can I get java's parser to be forgiving with badly formed html?

I'm attempting to do some screen scraping however the html being returned is causing an error as there is no header (i think). Below is the code public class xpath { private Document doc = null; public xpath() { HttpClient httpclient = new DefaultHttpClient(); HttpGet httpget = new HttpGet("http://blah.com/blah.php?param1...

How to change the link color of the current page with CSS

How do I display the link for the current page different from the others? I would like to swap the colors of the text and background. This is what I currently have: The HTML: <div id="header"> <ul id="navigation"> <li class="bio"><a href="http://www.jacurren.com/"&gt;Home&lt;/a&gt;&lt;/li&gt; <li class="theatre"><a href...

Image inside a button not positioned correctly in Firefox

I have the following markup: <p class="managebox"> <button value="Add page"> <img src="page_add.png" alt="Add more content" /> Add Page </button> </p> And the following CSS: p.managebox { position: relative; } p.managebox button { display: block; padding: 5px 7px 4px 30px; positio...

can an html input be put inside a text area

For example I have limited space and I want the submit button to appear in the bottom right of the text area. Something like this?: <textarea value='text message' name='messageSMS' id='messageSMS' onfocus='clearInput(this)' onblur='clearInput(this)'> <input value='send' id='sendSMS' type='submit' name='submit' /> </textarea> ...

Padding doesn't get displayed

If width of a viewport is set to 1024px and if I create the following html document: <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <style type="text/css"> p { background-color:blue; padding:0px 250px; margin:0px 250px; overflow:scroll; } ...

Tricky CSS Layout

So I am making a website with quite a problematic layout. There are four corner images TL, TR, BL and BR indicated by black blocks. The dark orange area is the main content (to a width of 960px), with the outside area denoted by the green arrow as the browser window. See diagram: The top image represents the site at its narrowest po...

Based on what parameters does browser decide what the `width` of an element should be(when width="auto")?

1) If textbox element (<input type=”text” /> ) has its width property set to inherit, then textbox doesn’t overflow. But if textbox has width set to auto, then it overflows due to browser calculating the width. a) Why doesn’t browser take into the account that textbox is inside another element and thus adjusts the width of a textbox...

Convert standard link to image link

I'd like to convert a normal link tag into an image tag, How would I convert this following, <a href="images/first.jpg">This is an image.</a> <a href="images/second.jpg">This is yet another image.</a> <a href="images/third.jpg">Another image.</a> Into this with php, <img src="dir/images/first.jpg">This is an image. <img src="dir...

i have a var that i want to translate (is name is ftext) i am using the GET method

i have this code: <html xmlns="http://www.w3.org/1999/xhtml"&gt; <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title></title> <script type="text/javascript" src="http://www.google.com/jsapi"&gt;&lt;/script&gt; <script type="text/javascript"> google.load("language", "1"); funct...

xslt disable-output-escaping turns non-latin characters into question marks "...???????????..."

Hi, I'm using xslt do display Solr response in html, my xsl file is in UTF-8 and non-latin characters (arabic) are nicely displayed, the problem is that when I use disable-output-escaping="yes" to parse html tag, the non-latin chars become a series of question marks ????????? Any clue ? Thanks in advance ...

PHP array problem?

I'm new to PHP and I want this code <option value="" disabled="disabled">-------------</option> to be disabled when the php code is building my select list of options. How can I fix my php code so it will always set that specific option to disabled? Here is part of the php code. echo '<select name="country" id="country" size="20">' . ...

Why does setting the margin on a div not affect the position of child content?

I'd like to understand a little more clearly how css margins work with divs and child content. If I try this... <div style="clear: both; margin-top: 2em;"> <input type="submit" value="Save" /> </div> ...the Save button is right up against the User Role (margin fail): If I change it to this... <div style="clear: both;"> ...

Using PHP substr() and strip_tags() while retaining formatting and without breaking HTML

I have various HTML strings to cut to 100 characters (of the stripped content, not the original) without stripping tags and without breaking HTML. Original HTML string (288 characters): $content = "<div>With a <span class='spanClass'>span over here</span> and a <div class='divClass'>nested div over <div class='nestedDivClass'>there</di...

Problems with fieldset absolute positioning

I'm coding a windows program which is a WYSIWYG form generator. In a very simple test I placed a fieldset and dropped a checkbox and a text input field onto it. The generated HTML looks fine when I read it, but it displays wrongly in Firefox, MSIE & K-meleon (which I think has an FFF engine). The fieldset height does no seem to be re...

event for textbox update

I have a textbox and want an event triggered whenever it is updated, whether through key presses, pasted from clipboard, or whatever else is possible. Is binding to the keyup event sufficient or is there a better way? ...

How to add a URL and Buttons on top of an Existing Header Image

Hi, 1) I have a header jpeg image that spans a width of 996px that has a square logo to the left of this header. My question is that I would like to use this square logo section only and place a ahref tag so that when the user hover's over this section only, the cursor changes to a hand pointer and the user will be redirected back to t...

Technique for ensuring HTML- and URL-encoding

Has anyone implemented a good system for ensuring that output is properly HTML-encoded where it makes sense? Maybe even something that recognizes when output should be URL-encoded or JSON-encoded instead? The lazy approach — just encoding all inputs — causes problems when you want to send those inputs to a database, or to a block of Jav...