www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] What is the default value of width and height of <div> element?

Hybrid View

  1. #1
    Join Date
    May 2008
    Posts
    55

    resolved [RESOLVED] What is the default value of width and height of <div> element?

    What is the default value of width and height of <div> element?
    Does it depends on browsers?

    If so, how to calculate them?

  2. #2
    Join Date
    Oct 2013
    Posts
    516
    If by itself and outside another block level element an empty and unstyled <div> has no width or height. If an empty <div> is within another block level element it will act like a paragraph break so it has "height" there. In other words, it will give you a line-height break when empty (<div></div>) and unstyled. You can change all this with CSS.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles