#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    5
    Rep Power
    0

    Remove space under heading html


    Hi,

    my code looks as follows:

    <h3>some headnig<h3>

    Is there a way to remove the space under a heading inline? This is only an exception from the other h3 headings.

    Any help is much appreciated thanks!
  2. #2
  3. Did you steal it?
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,965
    Rep Power
    9397
    Kinda depends where that space is coming from. Could be padding or a margin on the H3, could be on some other element, could be a BR... Could be one of a number of things.

    Comments on this post

    • BuildMyWeb agrees
  4. #3
  5. No Profile Picture
    buildmyweb.org
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    NY
    Posts
    62
    Rep Power
    8
    Code:
    <h3 style="margin-bottom:0px;">some headnig</h3>
    a better solution would be to place this in the external css. you could try selecting it via its parent to isolate it from other h3s:
    Code:
    #main h3 { margin-bottom:0px; }
    or select it via a class:
    css:
    Code:
    h3[class="no_margin"] { margin-bottom:0px; }
    html:
    Code:
    <h3 class="no_margin">some headnig</h3>
    as requinix pointed out, there may be additional issues contributing to space but the above is a start.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    5
    Rep Power
    0
    Thanks for your help guys!

    Turns out it was the paragraph under the heading that had the margins causing the spacing, not the heading itself.

    Cheers!
  8. #5
  9. No Profile Picture
    buildmyweb.org
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    NY
    Posts
    62
    Rep Power
    8
    glad you got it worked out
  10. #6
  11. No Profile Picture
    Permanently Banned
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Posts
    5
    Rep Power
    0
    May there is a br in the coding or H3.

    Comments on this post

    • requinix disagrees : it wasn't. scroll up.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    10
    Rep Power
    0

    Reply


    Thanks to post this coding..It will be useful to all
  14. #8
  15. No Profile Picture
    buildmyweb.org
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Location
    NY
    Posts
    62
    Rep Power
    8
    i think what is most useful is the end result. the OP states that in the end it was a <p> underneath the <h3> that was cuasing his "space". this was not so easy to discover out of context. if the HTML had been provided at the outset, we would have been able to help him more efficiently.

    i know, not so obvious when you are starting out but posting all relevant code is essential to getting good help in a community. toodles!
    Freelance Web Developer | Web Hosting |
    PHP Applications
    Web Development, Hosting, Graphic Design, SEO
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2012
    Posts
    13
    Rep Power
    0
    You can use this code <pre></pre>

IMN logo majestic logo threadwatch logo seochat tools logo