Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Jun 2009
    Posts
    68
    Thanks
    22
    Thanked 0 Times in 0 Posts

    Unwanted margin on css float

    Hello

    I am putting together a new website and have a problem with an unwanted margin on a css float. I can't seem to get rid of the margin even if I add margin: 0px to the class.

    http://www.discos.co.uk/temp/index.html

    The margin I am trying to delete is around the "What We Do", "Get a Quote", "Frequently Asked Questions", and "Coverage Area" buttons.

    Any help greatly appreciated.

  • #2
    Senior Coder
    Join Date
    Sep 2010
    Posts
    2,250
    Thanks
    15
    Thanked 254 Times in 254 Posts
    You're using inline code with strict doctype, try converting that to css. That will give you more control and be consistent with the doctype.

  • #3
    New Coder
    Join Date
    Jun 2009
    Posts
    68
    Thanks
    22
    Thanked 0 Times in 0 Posts
    Hi There

    That doesn't seem to have made any difference.

    Regards
    Nick

  • #4
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    hmmm have you tried just adding a global style rule for margins and paddings?


    Code:
    *{margin: 0;
    padding:0;}

  • #5
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello nickburrett,
    Giving it a height cleans it up in FF.

    Add this to your CSS - .topleft, .topright {height: 136px;}
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad

  • Users who have thanked Excavator for this post:

    nickburrett (11-15-2010)

  • #6
    New Coder
    Join Date
    Jun 2009
    Posts
    68
    Thanks
    22
    Thanked 0 Times in 0 Posts
    Thank you!

    The height value sorted it out!

    Sometimes things are so simple you just can't work them out!


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •