Solved

Units of Length for Width and Height

Posted on 2008-10-26
5
578 Views
Last Modified: 2012-05-05
I'm working on a <td> element with width and height values with no units <td style="width: 7; height: 86;">.  No units are expressed with the 7 and 86, what are the units?
0
Comment
Question by:jdana
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 13

Assisted Solution

by:Xyptilon2
Xyptilon2 earned 350 total points
ID: 22806952
The default unit is px
0
 
LVL 11

Expert Comment

by:jgmontgo
ID: 22806957
As Xyptilon2 says the default unit is px, which is short for pixels
0
 

Author Comment

by:jdana
ID: 22807025
px, thank.  Is the same true for a <div> with height and width style properties?
0
 
LVL 13

Accepted Solution

by:
Xyptilon2 earned 350 total points
ID: 22807060
I looked it up in the official CSS specification.

Non 0 length attributes MUST have a unit defined. If they do not, it is up to the browser to determine what to do.

Since browsing deals with online media, it will try to approximate the length as much as possible and choose px.

If they (the units) are missing then some browsers follow the spec and ignore the invalid property/value combination, some browsers assume pixels for the reason above , and some browsers base their decision on if the browser is in quirks or
standards mode.
0
 

Author Closing Comment

by:jdana
ID: 31510085
thanks again
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

724 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question