School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,148 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,726 people online right now. Registration is fast and FREE... Join Now!




CSS Positioning Help

 

CSS Positioning Help, Doesn't work in Firefox!!

tim4christ

29 Oct, 2009 - 02:42 PM
Post #1

D.I.C Head
Group Icon

Joined: 11 Aug, 2009
Posts: 113



Thanked: 2 times
Dream Kudos: 50
My Contributions
I am in the process of switching this website over to dreamweaver. (I want to produce better code.) The problem has come in when I try to set up the layout. You see, pretty much all my images/text are in div tags. I want to now center all of thos div tags making a centered layout website. So, I put all the div tags inside a table; then I centered the table. Everything looks perfect in IE, Navigator, and Opera but in Firefox it shows only half of the flash, and the rest of the divs are not in the centered layout, they are on the left side!! mad.gif Here is the link: http://www.thecross.tv/home1.html. I should also say that all the divs are positioned as absolute, except for the table (.main) which is relative. Thanks for any help on this matter. smile.gif

This post has been edited by tim4christ: 29 Oct, 2009 - 02:51 PM

User is offlineProfile CardPM
+Quote Post


iphoneorange

RE: CSS Positioning Help

29 Oct, 2009 - 04:12 PM
Post #2

D.I.C Head
Group Icon

Joined: 20 Aug, 2008
Posts: 145



Thanked: 17 times
Dream Kudos: 75
My Contributions
QUOTE(tim4christ @ 29 Oct, 2009 - 02:42 PM) *

I am in the process of switching this website over to dreamweaver. (I want to produce better code.) The problem has come in when I try to set up the layout. You see, pretty much all my images/text are in div tags. I want to now center all of thos div tags making a centered layout website. So, I put all the div tags inside a table; then I centered the table. Everything looks perfect in IE, Navigator, and Opera but in Firefox it shows only half of the flash, and the rest of the divs are not in the centered layout, they are on the left side!! mad.gif Here is the link: http://www.thecross.tv/home1.html. I should also say that all the divs are positioned as absolute, except for the table (.main) which is relative. Thanks for any help on this matter. smile.gif


just by clicking the link, I could tell the div were absolutely positioned. Thats probably the problem.

Hope I helped biggrin.gif
User is offlineProfile CardPM
+Quote Post

tim4christ

RE: CSS Positioning Help

29 Oct, 2009 - 04:16 PM
Post #3

D.I.C Head
Group Icon

Joined: 11 Aug, 2009
Posts: 113



Thanked: 2 times
Dream Kudos: 50
My Contributions
So, what do I do? Make everything relatively positioned? Thanks! smile.gif
User is offlineProfile CardPM
+Quote Post

iphoneorange

RE: CSS Positioning Help

29 Oct, 2009 - 04:31 PM
Post #4

D.I.C Head
Group Icon

Joined: 20 Aug, 2008
Posts: 145



Thanked: 17 times
Dream Kudos: 75
My Contributions
yes...and i noticed you have a lot of classes, but you gotta do what you gotta do lol
User is offlineProfile CardPM
+Quote Post

tim4christ

RE: CSS Positioning Help

29 Oct, 2009 - 04:34 PM
Post #5

D.I.C Head
Group Icon

Joined: 11 Aug, 2009
Posts: 113



Thanked: 2 times
Dream Kudos: 50
My Contributions
Are classes bad? Would it be better if I used the float attribute or used tables? Using relative css is kind of frustrating to set up cause dreamweaver doesn't let you move the objects--you have to set the numbers up manually. sad.gif
User is offlineProfile CardPM
+Quote Post

iphoneorange

RE: CSS Positioning Help

29 Oct, 2009 - 04:45 PM
Post #6

D.I.C Head
Group Icon

Joined: 20 Aug, 2008
Posts: 145



Thanked: 17 times
Dream Kudos: 75
My Contributions
No! classes are good, it's just that when you have change your code a lot, it can sometimes be a hassle (just imagine how hard it would be if you didn't use classes!!!)

I prefer tables, and though they're old school, they've never done me wrong biggrin.gif

I've never used dreamweaver, but I can imagine

== EDIT: AUGH! typos...bad ones :| ==

This post has been edited by iphoneorange: 29 Oct, 2009 - 04:46 PM
User is offlineProfile CardPM
+Quote Post

tim4christ

RE: CSS Positioning Help

29 Oct, 2009 - 07:09 PM
Post #7

D.I.C Head
Group Icon

Joined: 11 Aug, 2009
Posts: 113



Thanked: 2 times
Dream Kudos: 50
My Contributions
Thanks! biggrin.gif I'll try tables. wink2.gif
User is offlineProfile CardPM
+Quote Post

thehat

RE: CSS Positioning Help

30 Oct, 2009 - 06:24 PM
Post #8

awake ? web();
Group Icon

Joined: 28 Feb, 2008
Posts: 940



Thanked: 99 times
Dream Kudos: 200
My Contributions
The reason not to use tables is that they go against web standards, which say that tables should only be used to display tabular data. When you place a table on a page it has to be interpreted as one, which in a screen reader or similar technology means that the tags are read out to the user. This can be confusing when you're not expecting to hear tabular data, and causes frustration.

Instead of tables, you should try using divs. A div tag is treated purely as a layout device, and is not read out by screen readers or other devices. In your case, I think you need to start by removing all of your position:absolute rules. Then replace your table with a single div that wraps all of your content. Give it an id, let's say 'wrapper', and apply the following css:
CODE

div#wrapper {
     width:922px; /* set to your content width */
     margin:0 auto;
     position:relative;
}

What these do is set the wrapper's width (obviously!) and set the side margins to automatically divide the remaining viewport between them. The position:relative won't affect the position of this div at all, but it will mean that if you decide to use any absolute positions inside the wrapper they're zero point will be the top left of the wrapper div rather than the viewport.


User is offlineProfile CardPM
+Quote Post

tim4christ

RE: CSS Positioning Help

30 Oct, 2009 - 07:48 PM
Post #9

D.I.C Head
Group Icon

Joined: 11 Aug, 2009
Posts: 113



Thanked: 2 times
Dream Kudos: 50
My Contributions
Hey, thanks man! biggrin.gif That works! (And it's a whole lot easier than redoing all the positioning!! icon_up.gif)
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 04:03PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month