Results 1 to 4 of 4

Thread: Margin problems...

  1. #1
    Join Date
    Aug 2009
    Location
    London
    Posts
    93
    Thanks
    26
    Thanked 0 Times in 0 Posts

    Default Margin problems...

    Hi,

    Iam having problem with a margin and I can't figure out what the problem is. The gap between the nav bar & the purple box should be 10px, but when I view in Safari or FF it is more like 60px.

    I think I need a fresh pair of eyes to look at this.

    Thanks in anticipation of your replies.

    Click image for larger version. 

Name:	Screen shot 2013-03-26 at 11.24.36.jpg 
Views:	324 
Size:	53.3 KB 
ID:	5004

    Code:
    body { background: #000000; }
    
    #container { width: 980px; background: #FFFFFF; margin: 0 auto; text-align: left; }
    	
    #homebox { margin-top:10px; width: 980px; height: 777px; background-color: #af8798; }	
    
    #hometext { position: relative; top: 0px; left: 48px; width: 800px; text-decoration: none; font-family:Georgia, "Times New Roman", Times, serif; color: #ffffff; vertical-align: top; font-size: 60px; }
    
    p.introtext1 {text-decoration: none; font-family:Georgia, "Times New Roman", Times, serif; font-size: 80px; letter-spacing: 6px; color: #ffffff; font-style: italic; width: 780px; vertical-align: top; }
    Code:
    <div id="container">
    
    <div style="margin-top:10px; background:#600F31; height:30px;">
        <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
           <td width="11%" align="center" valign="middle"><a href="index.html" class="bianco">Home</a></td>
            <td width="13%" align="center" valign="middle"><a href="food.html" class="bianco">Food</a></td>
            <td width="13%" align="center" valign="middle"><a href="wine.html" class="bianco">Wine</a></td>
            <td width="19%" align="center" valign="middle"><a href="cooking.html" class="bianco">Cooking Classes</a></td>
            <td width="19%" align="center" valign="middle"><a href="walking.html" class="bianco">Walking</a></td>
            
            <td width="10%" align="center" valign="middle"><a href="more.html" class="bianco">..More</a></td>
          </tr>
        </table>
        </div>
        
    <div id="homebox">
      <div id="hometext">
        <p class="introtext1">Bespoke</p>
        <p> food, wine &amp; walking</p>
      </div>
    </div>
    
    </div>
    Last edited by jhatter; 03-26-2013 at 01:50 PM.

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    3,007
    Thanks
    25
    Thanked 586 Times in 566 Posts
    Blog Entries
    37

    Default

    Try setting margin:0; on #hometext and p.introtext1 (paragraphs come with, amongst other things, their own default margins in different browsers)
    Focus on Function Web Design
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps

  3. The Following User Says Thank You to Beverleyh For This Useful Post:

    jhatter (03-28-2013)

  4. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,663
    Thanks
    39
    Thanked 199 Times in 193 Posts
    Blog Entries
    48

    Default

    On my machine, the gap is too big with all browsers.
    You should set margin-top:-60px on #homebox.

  5. #4
    Join Date
    Aug 2009
    Location
    London
    Posts
    93
    Thanks
    26
    Thanked 0 Times in 0 Posts

    Default

    Thanks Beverley, that sorted the problem.

Similar Threads

  1. Swiss Army link problems and scrolling problems
    By jcwlibrarian in forum Dynamic Drive scripts help
    Replies: 0
    Last Post: 01-31-2011, 05:54 PM
  2. Smooth Menu and IE - Problems over Problems!
    By hinkel11 in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 09-15-2009, 11:27 AM
  3. IE DOM problems...?
    By ??? in forum JavaScript
    Replies: 4
    Last Post: 01-01-2009, 07:14 PM
  4. IE Problems
    By keydin in forum CSS
    Replies: 0
    Last Post: 11-27-2007, 01:21 AM
  5. Pop-up Box 2 Problems
    By akulion in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 11-25-2006, 12:09 PM

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
  •