CSS Positioning Help

Doesn't work in Firefox!!

Page 1 of 1

9 Replies - 917 Views - Last Post: 05 February 2012 - 09:18 AM

#1 tim4christ  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 164
  • Joined: 11-August 09

CSS Positioning Help

Posted 29 October 2009 - 03: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!! :angry: 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. :)

This post has been edited by tim4christ: 29 October 2009 - 03:51 PM


Is This A Good Question/Topic? 0
  • +

Replies To: CSS Positioning Help

#2 athlon32  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 116
  • View blog
  • Posts: 363
  • Joined: 20-August 08

Re: CSS Positioning Help

Posted 29 October 2009 - 05:12 PM

View Posttim4christ, on 29 Oct, 2009 - 02:42 PM, said:

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!! :angry: 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. :)


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

Hope I helped :D
Was This Post Helpful? 0
  • +
  • -

#3 tim4christ  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 164
  • Joined: 11-August 09

Re: CSS Positioning Help

Posted 29 October 2009 - 05:16 PM

So, what do I do? Make everything relatively positioned? Thanks! :)
Was This Post Helpful? 0
  • +
  • -

#4 athlon32  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 116
  • View blog
  • Posts: 363
  • Joined: 20-August 08

Re: CSS Positioning Help

Posted 29 October 2009 - 05:31 PM

yes...and i noticed you have a lot of classes, but you gotta do what you gotta do lol
Was This Post Helpful? 0
  • +
  • -

#5 tim4christ  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 164
  • Joined: 11-August 09

Re: CSS Positioning Help

Posted 29 October 2009 - 05:34 PM

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. :(
Was This Post Helpful? 0
  • +
  • -

#6 athlon32  Icon User is offline

  • D.I.C Regular
  • member icon

Reputation: 116
  • View blog
  • Posts: 363
  • Joined: 20-August 08

Re: CSS Positioning Help

Posted 29 October 2009 - 05:45 PM

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 :D

I've never used dreamweaver, but I can imagine

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

This post has been edited by iphoneorange: 29 October 2009 - 05:46 PM

Was This Post Helpful? 1
  • +
  • -

#7 tim4christ  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 164
  • Joined: 11-August 09

Re: CSS Positioning Help

Posted 29 October 2009 - 08:09 PM

Thanks! :D I'll try tables. ;)
Was This Post Helpful? 0
  • +
  • -

#8 thehat  Icon User is offline

  • awake ? web();
  • member icon

Reputation: 106
  • View blog
  • Posts: 951
  • Joined: 28-February 08

Re: CSS Positioning Help

Posted 30 October 2009 - 07:24 PM

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:
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.
Was This Post Helpful? 1
  • +
  • -

#9 tim4christ  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 4
  • View blog
  • Posts: 164
  • Joined: 11-August 09

Re: CSS Positioning Help

Posted 30 October 2009 - 08:48 PM

Hey, thanks man! :D That works! (And it's a whole lot easier than redoing all the positioning!! :^:)
Was This Post Helpful? 0
  • +
  • -

#10 Viper2KX  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 195
  • Joined: 25-January 09

Re: CSS Positioning Help

Posted 05 February 2012 - 09:18 AM

Would you be interested if I posted a table-less stylesheet with a basic outline of the HTML?

Unless there is already a tutorial somewhere on </dream.in.code>
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1