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 5 of 5
  1. #1
    New Coder
    Join Date
    Nov 2011
    Location
    Morley, UK
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts

    CSS Image Padding/Margin Issue in IE

    Hi Guys having an issue with IE styling



    Uploaded with ImageShack.us

    In firefox it displays correctly, in IE the causes the Green "Header" to expand

    Code:
     
    <div class = "topbar">
    <div class = "header">		
    <label id="headtext">Heavy Woollen District Junior Cricket League</label>
    <div><img src="images/hwlogo.jpg" class="img1"></div>
    </div>
    		
    <div class = "toplinks">
    <a href="?&team=1" class="toplink">Home</a><a href="?page=leagues&&team=1" class="toplink">Leagues</a><a href="?page=teams&&team=1" class="toplink">Clubs</a><a href="?page=news&&team=1" class="toplink">News</a><a href="?page=gallery&&team=1" class="toplink">Gallery</a><a href="?page=fixtures&&team=1" class="toplink">Fixtures</a><a href="?page=results&&team=1" class="toplink">Results</a><a href="?page=admin&&team=1" class="toplink">Admin</a>		
    </div>
    		
    <div class = "sublinks">
    </div>
    </div>
    CSS

    Code:
     
    .img1
    {
    position:relative;
    display: block;
    left:7px;
    top:-40px;
    padding: 0px;
    margin: 0px;
    border: 0px;
    }
    Any help would be much appreciated

  • #2
    Regular Coder jamesicus's Avatar
    Join Date
    Oct 2008
    Posts
    106
    Thanks
    0
    Thanked 11 Times in 10 Posts
    Web Developer Tool Kit - for creating Standards compliant and Interoperable web pages
    W3C Markup Validation Service - validate HTML code for reliable rendering in all Browsers
    WAVE accessibility evaluation tool - check page structure, image alt text, form labels, etc.

  • #3
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    409
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Without a link to the page so I can see the full code, my guess is that you do not have a proper doctype to keep IE out of quirksmode.
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&

  • #4
    New Coder
    Join Date
    Nov 2011
    Location
    Morley, UK
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Thumbs up

    Quote Originally Posted by jamesicus View Post
    Thanks for the links it's not a box model issue as such as padding, margin and border are all set to 0

    turns out COBOLdinosaur was correct no DOC type assigned

  • #5
    Regular Coder COBOLdinosaur's Avatar
    Join Date
    Jul 2002
    Location
    Canada
    Posts
    409
    Thanks
    2
    Thanked 32 Times in 32 Posts
    Sometimes I get lucky.
    100% standards compliant code is 100% correct 100% of the time.
    one of my toys from my repository and perhaps some help getting help

    Cd&


  •  

    Posting Permissions

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