Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > CSS
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

CSS CSS styling code help for your website, CSS is like art and what makes your website look professional.

Google
Closed Thread
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 2:16 PM   #1
Christina
 
Christina's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Firefox div issues

Hi,

Here are the basics:

2 divs to display 2 header parts - one to the left and one to the right -
all is well
Below the header are 3 divs - one on the left for sales info, one in the
middle for company info, and one on the left for navigation.

I have it working beautifully in IE, so that the center div is fluid around
the right div. The top positioning is perfect below the header. But in
Firefox, the center div wants to move up to the top of the page and in
between the 2 header divs. By adding a top margin, Firefox will finally
position it below the headers. But IE adds the margin, too - which places
the center div way below the headers.

I tried using body>#divid {margin: 200px;} trick, from the CSS Anthology
book, which is supposed to make IE blind to it, but Firefox apparently
doesn't see it either. Here are the essential divs:

Headers:
#banner {
margin-bottom: 20px;
}

#banner h1 {
background: transparent url(bw.gif) no-repeat top left;
margin-top: 10px;
width: 313px;
height: 130px;
float: left;
}

#banner h2 {
background: transparent url(cld.gif) no-repeat top right;
margin-top: 58px;
margin-bottom: 40px;
margin-left: 60px;
width: 208px;
height: 28px;
float: right;
}

info divs:

Left:
#shopInfo {
clear:left;
margin: 20px 20px 20px 5px;
width: 160px;
float: left;
}

Middle (the problem child):
#designInfo {
padding: 10px 10px 20px 20px;
}

right:
#nav {
width: 160px;
float: right;
padding: 10px 10px 20px 20px;
}

I struggled to get this to work in IE until I discovered that the divs had
to be in a particular order on the html page. The left and right ones had
to come before the middle one. I've tried this both with a wrapper div that
defined margins and no margins in the body, and with only a body tag and
margins set in it.

I'm getting so confused - after you mess with something for a couple days
you tend to forget what you did to get where you are.

Any commentary is appreciated.

Christina


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Advertisements
Old 07-01-2007, 2:16 PM   #2
Mike Scirocco
 
Mike Scirocco's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Firefox div issues

Christina wrote:
> Hi,
>
> Here are the basics:
>
> 2 divs to display 2 header parts - one to the left and one to the right -
> all is well
> Below the header are 3 divs - one on the left for sales info, one in the
> middle for company info, and one on the left for navigation.
>
> I have it working beautifully in IE, so that the center div is fluid around
> the right div. The top positioning is perfect below the header. But in
> Firefox, the center div wants to move up to the top of the page and in
> between the 2 header divs. By adding a top margin, Firefox will finally
> position it below the headers. But IE adds the margin, too - which places
> the center div way below the headers.
>
> I tried using body>#divid {margin: 200px;} trick, from the CSS Anthology
> book, which is supposed to make IE blind to it, but Firefox apparently
> doesn't see it either. Here are the essential divs:
>
> Headers:
> #banner {
> margin-bottom: 20px;
> }
>
> #banner h1 {
> background: transparent url(bw.gif) no-repeat top left;
> margin-top: 10px;
> width: 313px;
> height: 130px;
> float: left;
> }
>
> #banner h2 {
> background: transparent url(cld.gif) no-repeat top right;
> margin-top: 58px;
> margin-bottom: 40px;
> margin-left: 60px;
> width: 208px;
> height: 28px;
> float: right;
> }
>
> info divs:
>
> Left:
> #shopInfo {
> clear:left;
> margin: 20px 20px 20px 5px;
> width: 160px;
> float: left;
> }
>
> Middle (the problem child):
> #designInfo {
> padding: 10px 10px 20px 20px;
> }
>
> right:
> #nav {
> width: 160px;
> float: right;
> padding: 10px 10px 20px 20px;
> }
>
> I struggled to get this to work in IE until I discovered that the divs had
> to be in a particular order on the html page. The left and right ones had
> to come before the middle one. I've tried this both with a wrapper div that
> defined margins and no margins in the body, and with only a body tag and
> margins set in it.
> I'm getting so confused - after you mess with something for a couple days
> you tend to forget what you did to get where you are.
> Any commentary is appreciated.
> Christina


How about posting the relevant html to go along with that?

Did you try using a "clear div" after each 'row' of floated divs?

..clear{
clear: both;
}
<div class='clear'></div>
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 2:16 PM   #3
Christina
 
Christina's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Firefox div issues

"Mike Scirocco" <mscir@yahoo.com> wrote in message
news:Rr6dndJdBqHIkqXYnZ2dnUVZ_s-dnZ2d@pghconnect.com...

>
> How about posting the relevant html to go along with that?
>
> Did you try using a "clear div" after each 'row' of floated divs?
>
> .clear{
> clear: both;
> }
> <div class='clear'></div>


Hi Mike,

Yes, I tried that, and it simply made it move below the surrounding divs. I
also tried clear:left; and clear:right; . It both cases would just move the
div below the banner section. Here's the basics of the html - really quite
simple:

<div id="content">
<div id="banner">
Header - placed at very top - 2 header tags, one floated left, 1
floated right
</div>
<div id="shopInfo">
Info on shopping and specials - this sits at the left below the
left-floated header tag. Width is static at 160px.
</div>

<div id="nav">
Navigation - this is a cascading menu that sits at the right below
the right-floated header tag. Width is static at 160px.
</div>

<div id="designInfo">
Info on designer and products - this is the one being rebellious.
It's a paragraph that is quite wordy. I want this to be fluid around the
nav menu. But when I widen the page, Firefox pulls it up between the two
headers to the top of the page, IE doesn't. If I set a large top margin on
it, FF obeys, but in IE it then drops way below the headers and is no longer
even with the top of the right and left divs.
</div>

<div id="designLines">
Specific info on each item- these are just a series of paragraphs.
</div>

<div id="footer" class="shrink">
text links to company details
</div>
</div>

I have tried it with and without the content div, moving the placement info
into the body tag, but that had no affect. Additionally, I have tried
setting max-width or min-width with no affect - this doesn't seem to work on
any of the tags (?). Setting the width property makes it lose the fluidity
I want.

Christina


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 2:16 PM   #4
Mike Scirocco
 
Mike Scirocco's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Firefox div issues

Christina wrote:
> "Mike Scirocco" <mscir@yahoo.com> wrote in message
> news:Rr6dndJdBqHIkqXYnZ2dnUVZ_s-dnZ2d@pghconnect.com...
>
>> How about posting the relevant html to go along with that?
>>
>> Did you try using a "clear div" after each 'row' of floated divs?
>>
>> .clear{
>> clear: both;
>> }
>> <div class='clear'></div>

>
> Hi Mike,
>
> Yes, I tried that, and it simply made it move below the surrounding divs. I
> also tried clear:left; and clear:right; . It both cases would just move the
> div below the banner section. Here's the basics of the html - really quite
> simple:
>
> <div id="content">
> <div id="banner">
> Header - placed at very top - 2 header tags, one floated left, 1
> floated right
> </div>
> <div id="shopInfo">
> Info on shopping and specials - this sits at the left below the
> left-floated header tag. Width is static at 160px.
> </div>
>
> <div id="nav">
> Navigation - this is a cascading menu that sits at the right below
> the right-floated header tag. Width is static at 160px.
> </div>
>
> <div id="designInfo">
> Info on designer and products - this is the one being rebellious.
> It's a paragraph that is quite wordy. I want this to be fluid around the
> nav menu. But when I widen the page, Firefox pulls it up between the two
> headers to the top of the page, IE doesn't. If I set a large top margin on
> it, FF obeys, but in IE it then drops way below the headers and is no longer
> even with the top of the right and left divs.
> </div>
>
> <div id="designLines">
> Specific info on each item- these are just a series of paragraphs.
> </div>
>
> <div id="footer" class="shrink">
> text links to company details
> </div>
> </div>
>
> I have tried it with and without the content div, moving the placement info
> into the body tag, but that had no affect. Additionally, I have tried
> setting max-width or min-width with no affect - this doesn't seem to work on
> any of the tags (?). Setting the width property makes it lose the fluidity
> I want.
> Christina


Hi Christina,

How do you like these approaches?

http://www.pixy.cz/blogg/clanky/css-3col-layout/
http://glish.com/css/7.asp

There are a lot of 3 column CSS examples on this page too:

http://css-discuss.incutio.com/?page=ThreeColumnLayouts

It looks like you'll probably want to try implementing one of these.

Sound like a good place to look?
Mike
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 2:16 PM   #5
Christina
 
Christina's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Firefox div issues

"Mike Scirocco" <mscir@yahoo.com> wrote in message
news:kbidnbNO8OnSUafYnZ2dnUVZ_rydnZ2d@pghconnect.c om...
>
> Hi Christina,
>
> How do you like these approaches?
>
> http://www.pixy.cz/blogg/clanky/css-3col-layout/
> http://glish.com/css/7.asp
>
> There are a lot of 3 column CSS examples on this page too:
>
> http://css-discuss.incutio.com/?page=ThreeColumnLayouts
>
> It looks like you'll probably want to try implementing one of these.
>
> Sound like a good place to look?
> Mike


Thanks, Mike. Now to just compare my css to theirs and see what I'm leaving
out (or putting too much of in). I got the basics of my 3 column layout
from the Sitepoint book by Rachel Andrew, The CSS Anthology. But I've also
looked into places such as csszengarden.com, etc. for inspiration and ideas.
I did find it interesting that the order of the divs in the html affected
the entire page - in all browsers. This is my first true full CSS layout -
I have worked with table layouts for so long and was under the impression
that CSS was going to be easy. Just package the section in a div tag and
place it where you want it on the page with CSS. Why can't it be just that
simple? It's only 3 columns, it's a web basic layout. The browser wars are
a bane to us all.

Christina


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 2:16 PM   #6
Mike Scirocco
 
Mike Scirocco's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Firefox div issues

Christina wrote:
<snip>

Please include the banner h1 html and show where you're putting it in
the page.

Mike
 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Old 07-01-2007, 2:17 PM   #7
sTony
 
sTony's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Firefox div issues

Sorry, but that is very bad css. You are breaking some very basic design
rules. Most notably, you are using explicit tag designations and sizes.
Try changing your browsers font-size, and watch what happens. Now I would
suggest that you use a class designation to add your styles, since it's a
bad habbit to use id's to apply css. The whole idea is that the css can be
re-used, and you've kinda eliminated that possibility, not to nit-pic. In
answer to your question. I believe your trouble comes from not recognizing
the fact that every tag also has default css attached to it, and different
browsers handle these defaults differently. Without the html, it's hard to
say what exactly is happening, but I bet it's your margins. Try setting
margin: 0px, where you don't what your margins. I bet mozilla is adding
margins where you haven't put any. Anyhow, best of luck.

"Christina" <designer@centurytel.net> wrote in message
news:LPqdnee6H7Pha6rYnZ2dnUVZ_qydnZ2d@centurytel.n et...
> Hi,
>
> Here are the basics:
>
> 2 divs to display 2 header parts - one to the left and one to the right -
> all is well
> Below the header are 3 divs - one on the left for sales info, one in the
> middle for company info, and one on the left for navigation.
>
> I have it working beautifully in IE, so that the center div is fluid

around
> the right div. The top positioning is perfect below the header. But in
> Firefox, the center div wants to move up to the top of the page and in
> between the 2 header divs. By adding a top margin, Firefox will finally
> position it below the headers. But IE adds the margin, too - which places
> the center div way below the headers.
>
> I tried using body>#divid {margin: 200px;} trick, from the CSS Anthology
> book, which is supposed to make IE blind to it, but Firefox apparently
> doesn't see it either. Here are the essential divs:
>
> Headers:
> #banner {
> margin-bottom: 20px;
> }
>
> #banner h1 {
> background: transparent url(bw.gif) no-repeat top left;
> margin-top: 10px;
> width: 313px;
> height: 130px;
> float: left;
> }
>
> #banner h2 {
> background: transparent url(cld.gif) no-repeat top right;
> margin-top: 58px;
> margin-bottom: 40px;
> margin-left: 60px;
> width: 208px;
> height: 28px;
> float: right;
> }
>
> info divs:
>
> Left:
> #shopInfo {
> clear:left;
> margin: 20px 20px 20px 5px;
> width: 160px;
> float: left;
> }
>
> Middle (the problem child):
> #designInfo {
> padding: 10px 10px 20px 20px;
> }
>
> right:
> #nav {
> width: 160px;
> float: right;
> padding: 10px 10px 20px 20px;
> }
>
> I struggled to get this to work in IE until I discovered that the divs had
> to be in a particular order on the html page. The left and right ones had
> to come before the middle one. I've tried this both with a wrapper div

that
> defined margins and no margins in the body, and with only a body tag and
> margins set in it.
>
> I'm getting so confused - after you mess with something for a couple days
> you tend to forget what you did to get where you are.
>
> Any commentary is appreciated.
>
> Christina
>
>



 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Featured Websites
Free Space
Free Space
Free Space Free Space
Closed Thread
Tags: , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
using FireFox on this forum MadKad Bugs And Feedback 9 08-07-2007 1:10 PM
Firefox stoppages Kadaitcha Man Windows 0 05-28-2007 10:07 PM


Featured Websites




All times are GMT +1. The time now is 3:32 PM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98