Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
margin-top problem in FF and Opera
Old 06-21-2008, 02:29 PM margin-top problem in FF and Opera
pealo86's Avatar
Super Spam Talker

Posts: 849
Name: Matt Pealing
Location: England, north west
Trades: 0
Strange, it works fine in Dreamweaver and IE. Basically, I have a nested div that contains several heading and paragraph elements.

The <h2> and <h3> elements work okay, but the <h1> just budges up against the top of the div! The margin appears to be there, its more like the div moves 'down'.

Any ideas anyone?

HTML:
Code:
          <div id="contentBgWide">
            <div id="contentWide">
              <h1>Services</h1>
              <p>To make things easier for you, I have split my services into packages. The higher level packages contain more features and are aimed towards clients who need a more demanding design / development solution. Currently there are only packages for websites, however I will be adding graphic design packages as time goes on. All current graphic design queries should be submitted through the <a href="contact.htm">contact</a> page.</p>
              <div class="pService1">
              <br class="clear" />
              <h2>Level 1 Web package</h2>
              <p>The level 1 website package is ideal for those who just need to get the message across about who they are and what they do. This will be useful if you have a small business or shop and want your customers to be able to gain a better understanding of how you work. This would also be suited to those who have a band or are a member of a club and want people to be able to access information on it.</p>
              <p>Due to the lack of dynamic content that would be generated through a CMS (see below) I can guaruntee that all Level 1 packages will be valid <a href="http://validator.w3.org/" target="_blank">XHTML</a> and <a href="http://jigsaw.w3.org/css-validator/" target="_blank">CSS</a>.</p>
              <p>The level 1 web package includes the following features:</p>
              <ul class="list">
                <li>5 static web pages</li>
                <li>Contact form with PHP email function</li>
              </ul>
              <p><span class="bold">Cost:</span> £150 <span class="highlight">*</span><br />
                <span class="bold">Estimated completion time:</span> 1 Month <span class="highlight">**</span></p>
              </div>
CSS:

Code:
#content, #contentWide {
    padding:0 15px 15px 15px;
    width:320px;
    background:url(../image/bgCropTop.gif) no-repeat;}

#contentBg {
    width:350px;
    background:url(../image/bgCropBtm.gif) no-repeat 0 100%;}

#contentBgWide {
    width:720px;
    background:url(../image/bgCropWideBtm.gif) no-repeat 0 100%;}
    
#contentWide {
    width:690px;
    background:url(../image/bgCropWideTop.gif) no-repeat;}

    
h1, h2, h3 {
    font-size:220%;
    margin:.5em 0;
    padding:0;}
        
h2 {
    font-size:140%;}
    
h3 {
    font-size:120%;}
    
p {
    padding:0;
    margin:.5em 0 1.5em;}
Thanks to anyone who can help!
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
 
Register now for full access!
Old 06-21-2008, 05:52 PM Re: margin-top problem in FF and Opera
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Try putting padding-top: 1px; on the #contentwide div, could very well be margin-collapse and that will stop it.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 06-21-2008, 06:07 PM Re: margin-top problem in FF and Opera
pealo86's Avatar
Super Spam Talker

Posts: 849
Name: Matt Pealing
Location: England, north west
Trades: 0
Ahhh thanks thats fixed it! Now that I think about it, I had this exact same problem a few weeks ago and you gave me the solution lol.
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
pealo86 is offline
Reply With Quote
View Public Profile Visit pealo86's homepage!
 
Old 06-22-2008, 11:18 AM Re: margin-top problem in FF and Opera
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
You always have to watch it when you have 2 divs butting up against each other, most of the time you're going to get margin-collapse.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to margin-top problem in FF and Opera
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.25491 seconds with 12 queries