Showing posts with label div in html. Show all posts
Showing posts with label div in html. Show all posts

How to set div beside each other ?

We can set div beside div by using float:left;

you may try this program if you need for example :

What Is a "div" Tag/Element?

A "div" element is a block element that you can use a container of flow elements (flow elements are really the superset of both inline elements and block elements). By default, "div" elements will be treated as paragraphs by most browsers. Here are basic rules about an "div" element:

  1. "div" elements are block elements.
  2. "div" elements can have PCDATA as contents.
  3. "div" elements can have inline elements as sub-elements.
  4. "div" elements can have block elements as sub-elements.
  5. A "div" element will be displayed as a paragraph by most browsers.