The tutor shares how to preserve white space on a web page. Html doesn’t always take white space literally: when you type five spaces, the browser might show only one. What if you want the browser to render all the …

Web design: css: the white-space property Read more »

Tagged with: , , , , , ,

The tutor talks a bit about “auto”: is it the default setting for layout? I’ve read that “auto” is default: unless you set the property to something else in particular, the element will be rendered as though that property was …

Web programming: the “auto” setting Read more »

Tagged with: , ,

The tutor discusses what he noticed while experimenting with jQuery css() and JavaScript style. JavaScript has a style function that allows you to access style attributes of an element. For example, to get an element’s color: var e1_color=document.getElementById(“e1”).style.color; However, as …

Web design: jQuery css() and JavaScript style: boundary testing Read more »

The tutor looks into a simple layout technique. In web design, vertical centering is often desirable. Here’s a quick example: Hello! This text is vertically centered. See the code below. <div style=”height:11em; display:table-cell;vertical-align:middle; background-color:LightGreen;color:white; font-size:150%”><div> I’ll mention other web …

CSS: Web design: Vertical centering Read more »

The tutor shows another jQuery function: css() Click me for css() demo:) This text and background will both change color. Click me to reset:) The jQuery code that changes the text from ordinary to white on red: $(“#p_jun_20_2016”).css({“color”:”rgb(255,255,255)”,”background-color”:”rgb(150,10,10)”}); …

Web Design: jQuery css() function Read more »

Tagged with: ,