html

Syntax highlighting when pasting into emails

Im in the situation that I often send small codesnippets and xml-snippets to coworkers and partners via my outlook. Has anyone got a good idea or tool that I can use to have my pastes syntaxhighlighted before I paste them into an email. I was thinking of an intermediate paste to "$fancytool" and then I would have something to copy that...

How do I align spans or divs horizontally?

My only problem is making them line up three-across and have equal spacing. Apparently, spans can not have width and divs (and spans with display:block) don't appear horizontally next to each other. Suggestions? <div style='width:30%; text-align:center; float:left; clear:both;'> Is what I have now. ...

Replace SRC attribute with TITLE in LI Tag

Hi, I have the html given below: <ul id="thumbsPhotos"> <li src="/images/1alvaston-hall-relaxing-lg.jpg" onclick="updatePhoto (this.title)"><img src="/images/1alvaston-hall-relaxing-sl.jpg" width="56" height="56"></li> <li onclick="updatePhoto(this.title)" src=""><img src="" width="56" height="56"></li> <li onclick="u...

Javascript function to 'get element by parent class' and assign

My predicament is fairly simple: this function gets the id of 'this' <li> element based on parent id of <ul>. It used to work fine but not any more, I will either need to have <ul> use classes instead of id while still being able to assign id of 'current' to the current element, or change my css function myFunction(element){ liArray ...

Soft hyphen in HTML (<wbr> vs. &shy;)

How do you solve the problem with soft hyphens on your web pages? In a text there can be long words which you might want to line break with a hyphen. But you do not want the hyphen to show if the whole word is on the same line. According to comments on this page <wbr> is a non standard "tag soup invented by Netscape". It seems like &shy...

Django Forms - How to Use Prefix Parameter

Say I have a form like: class GeneralForm(forms.Form): field1 = forms.IntegerField(required=False) field2 = forms. IntegerField(required=False) And I want to show it twice on a page within one form tag each time with a different prefix e.g.,: rest of page ... <form ..> GeneralForm(data,prefix="form1").as_table() GeneralForm(d...

How can I remove an entire HTML tag (and its contents) by its class using a regex?

Hi, I am not very good with Regex but I am learning. I would like to remove some html tag by the class name. This is what I have so far : <div class="footer".*?>(.*?)</div> The first .*? is because it might contain other attribute and the second is it might contain other html stuff. What am I doing wrong? I have try a lot of set wit...

HTML anchor with name attribute in ASP.NET

I'd like to make anchors to every post in my asp.net forum. Every forum's post is rendered using repeater control. How can I render <a name="anchor_name"></a> in asp.net? ...

Does the Internet explorer web developer toolbar work with popups?

I cannot get the internet explorer web developer tool bar to work with a pop-up, it won't render at the bottom of the pop-up. Any suggestions? ...

Convert Word doc to HTML programmatically in Java

Hi, I need to convert a Word document into HTML file(s) in Java. The function will take input an word document and the output will be html file(s) based on the number of pages the word document has i.e. if the word document has 3 pages then there will be 3 html files generated having the required page break. I searched for open source/...

Is it possible to have an html TEXTAREA-like element that wraps text rather than displays scrollbars?

Is there a css style that IE7 and Firefox will obey that changes the behavior of a TEXTAREA so that it behaves more like.... um..... more like the thing I'm typing into right now! ...

[CSS Positioning] How can I position a SPAN to be aligned to either side and above a TABLE?

<div> <span>left</span> <span>right</span> <!-- new line break, so no more content on that line --> <table> ... </table> </div> How can I position those spans (they can be changed to any element) so that depending on how big the table is (not defined anywhere, and shouldn't be) the spans are positioned just on top of the left side of ...

Could a website force the browser to go into fullscreen mode?

I want to run a psychological study for which participants have to look at large images. The experiment is done on the web and therefore in a browser window. Is it possible to tell the browser to go into fullscreen, for example on button press? I know there is the possibility to open a fixed-size popup window. Do you think this would b...

HTML/CSS designs for mundane text-heavy content

I am tasked with updating a family of web sites that promote scientific conferences that cater to a niche scientific field. The sites are currently written with some modest CSS layout for the shared common page template structure, but the details of each page are a mishmash of <p>, <br>, and &nbsp; to position the content. This makes i...

Can you propose a more elegant way to 'tokenize' c# code for html formatting?

(This question about refactoring F# code got me one down vote, but also some interesting and useful answers. And 62 F# questions out of the 32,000+ on SO seems pitiful, so I'm going to take the risk of more disapproval!) I was trying to post a bit of code on a blogger blog yesterday, and turned to this site, which I had found useful in ...

CSS "valign" Positioning

<div> <h1>Title</h1> <table> ... </table> </div> Now, the <h1> has a margin: 0; so it is at the top of the div. However I'd like the table to be placed at the bottom of the div, eg. valign="bottom" but for the whole table. ...

Centre Text Relative to Available Space in CSS

<div style="width: 300px"> <div id="one" style="float: left">saved</div><input type="submit" id="two" style="float: right" value="Submit" /> </div> I would like div#one to be centred in the space between the left edge of the parent div and the left edge of the submit button. ...

CSS Buttons (w/ Background but need bevel)

<input type="submit" background: url(tick.png) bottom left no-repeat; padding-left: 18px; But the bevel goes away, how can I add an icon to submit button and keep the bevel? Edit: I want it to look like the browser default. ...

How to add scrollbars to my HTML that disappear if the content is smaller than the limit

Hello I'm trying to create a form that has an expandable widget. The problem is that when the widget is open, The form extends outside the limit in the content box, and it looks bad. I tried using overflow:scroll but it creates 2 ugly scrollbars that do not disappear even if the conent is smaller then the content box. I only need one v...

Cancel a webform submit with PHP

I'm using a small site to experiment with the uploading of pictures and displaying them. When someone clicks "add a picture", they get taken to a page with a form on it. They can select a file and click the submit button. But what I want to do now is this: put a second submit button labeled "Cancel" next to the normal confirmation butt...