Posts

Showing posts with the label html

Using the HTML Agility Package to modify web pages

Image
Step 1: Create a new Visual Studio project Create a new Console application: Step 2: Use the Package Manager console to install the HTML Agility package. Select Tools > NuGet Package Manager > Package Manager Consol Enter: Install-Package HtmlAgilityPack Step 3: Add the reference to the HtmlAgilityPack.dll Right click you References folder, and browse to the HtmlAgilityPack.dll file that gets installed to the 'packages' folder in your Visual Studio project. Select and add this file: Step 4: Try it on some examples 1. Insert the 'DOCTYPE' comment before the main tag and insert a "

Using Google Docs Viewer to embed online documents into your web page

Image
Some instructions on using Google Docs Viewer to embed online documents into your web page. Step 1: use the iframe tag to create an “internal” frame within your document So the essential part of embedding online documents into your we page is to use the iframe tag in your html. The iframe tag accepts 3 x attributes: “src”, “width” and “height” If you are interested in removing the border from the iframe tag simply do this by the frameBorder attribute (remember - frameBorder is case-sensitive): frameBorder=”0” Step 2: Use the Google Docs link within your src attribute This is the Google docs link that you will append to the 'src' section of the iframe tag: https://docs.google.com/gview? So that all you need to do is supply the URL that Google docs view needs to point to. In this example, we are interested in embedding the following document, which is a Microsoft PowerPoint presentation that you can download from the Adobe site: https://www.adobe.com/suppor...

Getting started with EasyTree - a jquery tree menu builder

Image
EasyTree is a JavaScript Menu handling mechanism that is concise but easy to configure. It has a comprehensive set of options that can be tweaked according to the complexity of the requirement: anything from a basic tree menu to being able to handle the firing of events to the dragging and dropping of tree elements. You can download the set of EasyTree themes and core JavaScript files from here: http://www.easyjstree.com/EasyTree.zip However in my simple example I just link to the EasyTree web site when setting the href attributes, scripts etc. Example html showing a basic tree menu as shown: easyjstree.html [code language="html"] <doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>EasyTree - Free jquery tree menu</title> <meta name="keywords" content="EasyTree free jqu...

Applying reset stylesheets to HTML using CSS

Image
As John Meyer states: "The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on." I am using this pretty much as is. The only difference is that I have also deined my own style for “h1” styles heading, using 40px font size and red colouring: reset-css.css [code language="css"] /* http://meyerweb.com/eric/tools/css/reset/ v2.0 | 20110126 License: none (public domain) */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, vid...