SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Having done all this I E 8 gives me a margin ? How to get rid of it

    This is the web page

    http://www.c5d.co.uk/sterlingpayments.php

    You will see that it IE8 the "home symbol" has a yellow margin round it.

    It doesn't in Firefox or Chrome

    Is it possible to remove it ? Or it one of those IE quirks I keep reading about ?

    Thanks

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,167
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    IE is a stupid browser, but IE8 and above are not hard to deal with in general. Try something like this:

    Code:
    #menu-item-143 a {color: black;}

  3. #3
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm afraid that this doesn't have any effect.

    Is it possible to add a black margin ? Or might that put it round the yellow ?

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,167
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Another thing to try is

    Code:
    img {border: none;}

  5. #5
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's the one.

    Easy when you know how I guess

    Thanks again.

    I have finished with this bit of my site now, though I think you mentioned that I should try and remove the BR tags and replace them with line heights.

    I'll try and read up on it first before giving it a shot. Though my book isn't very clear.

    Thanks again

    Antony

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,167
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by certificates View Post
    I should try and remove the BR tags and replace them with line heights.
    Not so much line heights, as <p> tags. E.g. Replace this:

    Code:
    <p>Over the years I have made 
    many varied payments, for many varied things for anyone who needs to make a UK 
    Payment.<br><br>I have ordered films/fiches, paid a deposit on a holiday at a B 
    &amp; B in the Lake District, and numerous F H S Subscriptions where credit card 
    facilities are not acceptable.<br><br>My charges are, 
      2.00, plus 3.5% of your payment. This covers the commission levied by my 
    credit card company. <br><br>If you wish to pay by check/cheque, please contact 
    me by e mail, and I shall quote you in your currency.</p>
    with this:


    Code:
    <p>Over the years I have made many varied payments, for many varied things for anyone who needs to make a UK Payment.</p>
    
    <p>I have ordered films/fiches, paid a deposit on a holiday at a B &amp; B in the Lake District, and numerous F H S Subscriptions where credit card facilities are not acceptable.</p>
    
    <p>My charges are,  2.00, plus 3.5% of your payment. This covers the commission levied by my credit card company.</p> 
    
    <p>If you wish to pay by check/cheque, please contact me by e mail, and I shall quote you in your currency.</p>
    To spread the <p>s apart a bit, do something like this in your style sheet:

    Code:
    p {margin: 1em 0;}

  7. #7
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is where I get a bit stuck

    <<<<To spread the <p>s apart a bit, do something like this in your style sheet:



    Code:
    p {margin: 1em 0;}>>>

    What is 0 for and if you want some the equivalent of 2 BRs for one space and 3 BRs for another do you have to give them all different classes ?

    Off to work now so can't reply till later

    Thanks

    Antony

  8. #8
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,167
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by certificates View Post
    What is 0 for
    It's shorthapnd for this:

    Code:
    p {margin: 1em 0 1em 0;}
    which means a margin of 1em on top, zero to the right, 1em on the bottom and zero to the left. If top/bottom are the same, and left/right, you can abbreviate it to what I gave.

    and if you want some the equivalent of 2 BRs for one space and 3 BRs for another do you have to give them all different classes ?
    It would be odd to do it that way, but I guess you'd set a basic spacing (like I gave above) and give a special class to any <p> that had a different margin. There may be ways to do it efficiently, depending on how it's set up.

  9. #9
    SitePoint Addict
    Join Date
    Nov 2012
    Posts
    251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the explanation.

    Having looked at the book, it would seem that when I want a bigger space, the answer is padding

    It works that way.

    Thanks for the help

    Antony

  10. #10
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,167
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    It depends on what kind of space you want. Both padding and margins are very useful for different things. A background image/color will show up in the padding area, but not in margin area, for example.


Bookmarks

Posting Permissions

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