Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: HTML5/CSS
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:
#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.
 
<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 5-Jan-13 16:14pm
Edited 6-Jan-13 4:14am
v2
Comments
Sergey Alexandrovich Kryukov at 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ő at 6-Jan-13 3:04am
   
And where is that image? But better post the generated html instead of the image.
sameerhuilgol at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 437
1 sanket saxena 355
2 thatraja 240
3 Abhinav S 216
4 CPallini 215
0 Sergey Alexandrovich Kryukov 8,784
1 OriginalGriff 5,025
2 Peter Leow 3,839
3 Maciej Los 3,535
4 Er. Puneet Goel 3,107


Advertise | Privacy | Mobile
Web04 | 2.8.140415.2 | Last Updated 6 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Use
Layout: fixed | fluid