tags:

views:

61

answers:

3

Is it possible to make a <div> tag behave like a stock <br> tag with CSS?

Are there any other tags that cannot be mimicked by styling a <div>?

+2  A: 

add the style clear:both;

Brad
A: 

Not exactly sure I understand the question, "behave like a <br />. You can define the display attribute of both.

display: inline | block;

That will determine a line break before and after either element.

Dustin Laine
A: 

Yes, you can have a div do almost anything as long as you know exactly what properties to assign to it.

For a fake "br" tag (though I'm not sure why you would ever need this) you can set:

.classname {
height: 10px;
width:100%;
display:block;
position:relative;
}
Jamin
Why height in px and not in em?
Konerak