Tag Archives: css

css: display vs visibility

Tip: Even invisible elements takes up space on the page. Use the “display” property to create invisible elements that do not take up space.

Definition

The visibility property sets if an element should be visible or invisible.

Inherited: No

Tip: Even invisible elements takes up space on the page. Use the “display” property to create invisible elements that do not take up space.


JavaScript Syntax

CSS properties can also be dynamically changed with a JavaScript.

Scripting Syntax: object.style.visibility=”hidden”

In our HTML DOM tutorial you can find more details about the visibility property.

In our HTML DOM tutorial you can also find a full Style Object Reference.


Example

p
{
visibility: hidden
}

Possible Values

Value Description
visible The element is visible
hidden The element is invisible
collapse When used in table elements, this value removes a row or column, but it does not affect the table layout. The space taken up by the row or column will be available for other content. If this value is used on other elements, it renders as “hidden”

source:http://www.w3schools.com/CSS/pr_class_visibility.asp





css and email: how to do it

I’ve been having problem applying css on email. I almost wanted to sleep but bumping on these articles awoke my senses.

You will find tips and guidelines on these urls so please read them for their explanations on how to code html css driven for your emails:





http://warpspire.com/tipsresources/web-production/css-email-the-dirty-little-secret/
http://reachcustomersonline.com/2004/11/11/09.27.00/
http://www.webreference.com/programming/css_html

Bottom line just remember these things I got it from the webreference.com

Do …

  • Use inline style declarations for the most important styles.
  • Declare styles in a style tag when they’re not absolutely necessary.
  • Use table tags for multi-column layouts and floating elements.
  • Test your email in multiple standalone and Web-based email clients.

Don’t …

  • Use external stylesheets.
  • Use floating div tags for multi-column layouts.
  • Expect CSS background images to show up in most email clients.
  • Rely on images showing up, especially background images.

Now, I can sleep :P

css: opacity

There’s an interesting site where you can use as a reference for opacity. You can check it here => http://www.mandarindesign.com/opacity.html

W3C SAYS
Opacity can be thought of conceptually as a postprocessing operation. Conceptually, after the element (including its children) is rendered into an RGBA offscreen image, the opacity setting specifies how to blend the offscreen rendering into the current composite rendering.

Name: 	        opacity
Value: 	        <alphavalue> | inherit
Initial: 	1
Applies to: 	all elements
Inherited: 	no
Percentages: 	N/A
Media: 	        visual
Computed value: The same as the specified
value after clipping the <alphavalue>
to the range [0.0,1.0].

<alphavalue>
Syntactically a <number>. The uniform opacity setting to be applied across an entire object. Any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque) will be clamped to this range. If the object is a container element, then the effect is as if the contents of the container element were blended against the current background using a mask where the value of each pixel of the mask is <alphavalue>.

opacity 25 opacity 50 opacity 75 opacity 1.05

This example uses Mozilla proprietary code in conjunction with IE code. CSS3 is not fully defined as of today (August 2004). If you remove the -moz-opacity it will look like this.

Sample code:

fade{float:left;filter:alpha(opacity=100);-moz-opacity:1.0;opacity:1.0;}

cursor types in css

Possible Values

Value Description
url The url of a custom cursor to be used.Note: Always define a generic cursor at the end of the list in case none of the url-defined cursors can be used
default The default cursor (often an arrow)
auto Default. The browser sets a cursor
crosshair The cursor render as a crosshair
pointer The cursor render as a pointer (a hand) that indicates a link
move The cursor indicates something that should be moved
e-resize The cursor indicates that an edge of a box is to be moved right (east)
ne-resize The cursor indicates that an edge of a box is to be moved up and right (north/east)
nw-resize The cursor indicates that an edge of a box is to be moved up and left (north/west)
n-resize The cursor indicates that an edge of a box is to be moved up (north)
se-resize The cursor indicates that an edge of a box is to be moved down and right (south/east)
sw-resize The cursor indicates that an edge of a box is to be moved down and left (south/west)
s-resize The cursor indicates that an edge of a box is to be moved down (south)
w-resize The cursor indicates that an edge of a box is to be moved left (west)
text The cursor indicates text
wait The cursor indicates that the program is busy (often a watch or an hourglass)
help The cursor indicates that help is available (often a question mark or a balloon)

sources: http://www.w3schools.com/css/pr_class_cursor.asp
http://www.pageresource.com/dhtml/csstut10.htm