Edvinas
Edvinas

Reputation: 11

Space between two blocks

I encountered a problem where, in the following code-example a space is displayed between the red and black blocks.

Live: http://jsfiddle.net/WF5Ua/

I tried to change position, margin and etc., but I couldn't solve the trouble.

.slider {
    height:594px;
    width:100%;
    background-color:#eb5055;
    border-bottom:6px solid #ea676b;
    clear:both;
}

Upvotes: 0

Views: 1205

Answers (2)

rk rk
rk rk

Reputation: 324

The space is because of display:inline-block.for inline:block defaultly a 4px gap will be there.
You can remove that gap in so,many ways but one of my best is using margin and give as a value -4px or font-size:0px.
Rather than all this stuff you can use float:left.

Upvotes: 0

Arun Kumar
Arun Kumar

Reputation: 1667

Remove the display:inline-block; in header

http://jsfiddle.net/WF5Ua/1/

Upvotes: 3

Related Questions