Archive for the ‘html’ Category

css: display vs visibility

Friday, May 22nd, 2009 by dreamluverz

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: word wrap

Friday, May 22nd, 2009 by dreamluverz

Sample of word wrap or break word in css

word-wrap:break-word





align center not working on ie

Friday, May 1st, 2009 by dreamluverz

Last time I was having problem aligning my website at the center when viewing on ie browser ONLY. I’ve used margin-left:auto and margi-right:auto but it didn’t work but how come on my other websites it worked!

I found the culprit it’s my doctype coz on that website which I cannot center I’m using html 4 whereas on my other websites i’m using  xhtml1.  Actually that’s not the only issue coz on my previous post I also have problem on css hover on non-anchor tag, like applying hover on a <tr> and likewise this doctype saves the day.  There are still other issues like opacity…

Anyway, these issues only happened on ie browser but not on firefox and safari.

Check the sample below:

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd“>

nofollow links

Thursday, March 5th, 2009 by dreamluverz

I just heard about this new attribute added on links but really don’t have any idea about it. Thanks goodness to Dave Taylor that explains what is nofollow and it’s advantage on SEO.

By adding this attribute rel on your anchor/link,  search engine will ignore the linked site w/c gains page rank from the source site.

It’s done like this:
<a href=”some URL rel=”nofollow”>text that’s linked</a>

You can read more about it here: http://www.askdavetaylor.com/google_yahoo_and_msn_support_nofollow_whats_that.html


css and email: how to do it

Friday, January 16th, 2009 by dreamluverz

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

iframes: Different ways to access it

Saturday, January 10th, 2009 by dreamluverz

Different ways how to access iframes:

Check out http://www.quirksmode.org/js/iframe.html for detailed explanation.