Click here to Skip to main content
15,894,907 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Everyone,
wish you a great weekend first, can anyone help me out with this problem i.e i need to
remove space between two div or two elements(between "h4" and below div in my example)
i have attached an image and my css i need to keep every other stuff same
thanks
regards
sam
CSS:
CSS
#accrodion
{
    width:500px;
    height:auto;
    border:solid 1px;
    padding:10px;
    margin:0 auto;
}
#accrodion > h4
{
    cursor: pointer;
    width:100%;
    border: solid 1px;
    border-radius: 5px;

}
#accrodion > div
{
    width:100%;
    height:auto;
    border:solid 1px;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;
}

Here is the html file of that code and you can reffer the css above.
HTML
<body>
<div>
<header>
    <h1>accrodion</h1>
</header>
    <div id="accrodion">
        <h4>Question1</h4>
        <div>
        <p>You have to create your own html for the accordion. </p>
        </div>
        <h4>Question2</h4>
        <div>
        <p>You have to create your own html for the accordion.</p>
        </div>
        <h4>Question3</h4>
        <div>
        <p>You have to create your own html for the accordion.</p>
        </div>

</div>

<footer>
<p>
&copy; Copyright  by Sameer
</p>
</footer>
</div>
</body>

NOTE: its an jquery accrodion ui and m getting space between "h4" and "div" i dont need but i need to keep other stuff same i.e padding from top (1st h4)and bottom and side inside accrodion please help.
thanks

[Edit]Question updated with additional information posted as an answer.[/Edit]
Posted
Updated 6-Jan-13 4:14am
v2
Comments
Sergey Alexandrovich Kryukov 5-Jan-13 22:18pm    
And: sample of XML, on what browsers tested, what did you want to achieve, how it was rendered...
—SA
Zoltán Zörgő 6-Jan-13 3:04am    
And where is that image? But better post the generated html instead of the image.
sameerhuilgol 6-Jan-13 8:57am    
sorry for delay sir, here is the html code im my next post do suggest me your views
thanks

1 solution

float:left. If you have two divs, and any spaces between, you'll get one space unless you float them across to each other.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900