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.

HTML Forum


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



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Extra Firefox margin in layed floating DIVS
Old 09-11-2008, 10:12 PM Extra Firefox margin in layed floating DIVS
Novice Talker

Posts: 9
Trades: 0
I'm designing a site, and of course run into a problem. I haven't touched css or xtml for 3 months or so, so i ran into this issue and got stuck. Help me out.

The code below isn't my code, but the general idea

//CSS
div{
margin:0px;
}
#container{
width:842px;
}
.logo,.slide, .leftpic, .content,.footer{
float:left; //this is so everything will wrap
}
.content{
min-height:410px;
}
.textbox{
min-height:405px;
}

//XTML

<body>
<div id="container">
<div class="logo">
<div class="slide">
<div class="leftpic">
<div class="content">
<div class="textbox">
<p>This is some text that spans more that 410px</p>
</div>
</div>
<div class="footer"></div>
</div>
</body>

so, any long text will wrap itself in the textbox no problemo. So i add the content, and add a big left picture to match the size of the textbox. I use web developer bar in FF to find the size of the content.

Now the problem. In firefox, the div "textbox" has a 10px margin on the top between .content and itself. This means in IE7, that the text is displayed properly, but FF isn't, and causes 2 different sizes of the content, which means making an image fit is impossible. I want to remove that margin, but i can't figure it. padding, position, margin, nothing works if i just 0 it. So far, the only way i've figured is to -10 the margin, but then in IE, this causes the same friggen problem as in FF.

Sigh, give me a hand please. It'd be muchly appreciated.

Link to page with the problem:

http://www.s-designs.ca/lotus/firs.htm

Cheers
Sammers

please email me if you have the answer. sam@s-designs.ca. Thanks.

P.S
Not a professional, so don't rail me for improper use of floats. I know it could have been designed differently, but i'm in to deep now. If it requires an overhaul however, let me know.
samemrs is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 09-12-2008, 11:46 AM Re: Extra Firefox margin in layed floating DIVS
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
First of all, when you float an element it MUST have a defined with specified in the CSS. It's also good practice to put the width and height on images in your HTML. Leaving them off forces the browser to do the size calculations, and slows things down a bit.

The problem with your .textbox is NOT padding or margins on the div. The problem is the default margins on the H2. Zero out the top margin on the first h2 and everything will slide up where you want it.

You might want to go grab the Firebug extension for Firefox, it's an invaluable tool for things like this.
__________________
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


Last edited by LadynRed; 09-12-2008 at 11:48 AM..
LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Extra Firefox margin in layed floating DIVS
 

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 1.17356 seconds with 12 queries