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
ProgramFOX121.6K
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
0 thatraja 395
1 Sergey Alexandrovich Kryukov 295
2 Gihan Liyanage 261
3 kbrandwijk 204
4 CPallini 190
0 OriginalGriff 793
1 Sergey Alexandrovich Kryukov 604
2 Dnyaneshwar@Pune 604
3 Kornfeld Eliyahu Peter 530
4 thatraja 440


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

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100