Layers Vs Tables

  • Noobydoo
  • Novice
  • Novice
  • Noobydoo
  • Posts: 16

Post 3+ Months Ago

I've read on the net that people generally prefer to use layers rather than tables for web design, i guess partly for flexibility and also for making maintenance and changing things around easier.

But when i began using layers i found it so difficult because every browser would interpret them differently in placement and whatnot, and also different resolutions would display the page differently also.

I would really like to use layers instead. i feel like there's something important i'm missing about them. what's the secret?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

I don't know if there's one big secret that's going to solve all your problems.. really it's just a matter of experience I guess.

Are there any specific problems you're coming across that we could take a look at?
  • neksus
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 2194
  • Loc: Canada

Post 3+ Months Ago

Layers?
As in z-index?
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

I figured he just meant divs...?
  • Noobydoo
  • Novice
  • Novice
  • Noobydoo
  • Posts: 16

Post 3+ Months Ago

ya divs, i'm still using dreamweaver 8.

well when i first started making a page i had it all looking the way i wanted it to in dreamweaver and in firefox, then when i looked at it in explorer everything was spaced differently, spaces where i didn't want them and stuff.

then i tried using tables and it seemed like firefox and explorer understood the tables the same way.

the things i wanted to do would be like having a banner sent all the way to the left on every page, then an image bar underneath that would be sent all the way to the right, independent of resolution or whatever. i would have figured this could be a relative div, but they only allow reference from left and top.

i had a similar problem trying to get a logo in a fixed div to sit always in the bottom right of the page even if you scroll up or down, i tried margins and stuff but nothing worked properly, then i figured i could put the div in another div, maybe an ap or a relative one and it would work like i wanted, but still i would have the issue of getting that parent div to sit on the right.

I guess really my problem with divs, is that I don't understand exactly how to place them in such a way that different resolutions don't affect how they display or different browsers, at least not to any relevant extent. maybe having them stretch out to span across the entire page with an image in them for example that would stretch with them to accomodate any resolution screen, or just to place them relative to the right side of the screen rather than just the left. i think i may have figured this out using margins, at least for display in firefox, but whenever i would look at my div based pages in explorer it would look way off. I'm not really sure why, and i think this is my main problem. so i just switched to using tables, but i like alot of features of layers, so i would really like to resolve those compatibility issues. maybe i just need to read up alot about divs.
  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8411
  • Loc: USA

Post 3+ Months Ago

That's your problem. You are using Dreamweaver. Yeah, its a nice tool and gets a lot done, but the problem with it is that you don't really control the code unless you know XHTML (CSS AND HTML) and are able to configure those things at will.

I usually use Notepad++ as it's a great program with great syntax highlighting and auto-tabbing :)
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

Noobydoo wrote:
well when i first started making a page i had it all looking the way i wanted it to in dreamweaver and in firefox, then when i looked at it in explorer everything was spaced differently, spaces where i didn't want them and stuff.

This might be because of how different browsers add different default padding and margins to things. A way around that is to make sure you set all your padding and margins to zero right off the bat.

Noobydoo wrote:
the things i wanted to do would be like having a banner sent all the way to the left on every page, then an image bar underneath that would be sent all the way to the right, independent of resolution or whatever. i would have figured this could be a relative div, but they only allow reference from left and top.

You actually can reference from the right, too- not just left and top.

Noobydoo wrote:
i had a similar problem trying to get a logo in a fixed div to sit always in the bottom right of the page even if you scroll up or down, i tried margins and stuff but nothing worked properly, then i figured i could put the div in another div, maybe an ap or a relative one and it would work like i wanted, but still i would have the issue of getting that parent div to sit on the right.

If it's just an image you want located someplace, you could just put it in your CSS as a background image. Then you can set the background image location to bottom right.

Noobydoo wrote:
I guess really my problem with divs, is that I don't understand exactly how to place them in such a way that different resolutions don't affect how they display or different browsers, at least not to any relevant extent. maybe having them stretch out to span across the entire page with an image in them for example that would stretch with them to accomodate any resolution screen, or just to place them relative to the right side of the screen rather than just the left. i think i may have figured this out using margins, at least for display in firefox, but whenever i would look at my div based pages in explorer it would look way off. I'm not really sure why, and i think this is my main problem. so i just switched to using tables, but i like alot of features of layers, so i would really like to resolve those compatibility issues. maybe i just need to read up alot about divs.

You'll get it. Just take one thing at a time and pretty soon you'll be able to do all that stuff. Here's a site that helped me a ton when I was first learning this stuff. Give that a read and I bet things will start making a lot more sense.
  • Noobydoo
  • Novice
  • Novice
  • Noobydoo
  • Posts: 16

Post 3+ Months Ago

nice! thanks alot i think this is exactly what i needed.
  • Noobydoo
  • Novice
  • Novice
  • Noobydoo
  • Posts: 16

Post 3+ Months Ago

How would you go about referencing relative to the right then? just by adjusting margins?
  • jameson5555
  • Bronze Robot
  • Bronze Member
  • User avatar
  • Posts: 575
  • Loc: Phoenix, AZ

Post 3+ Months Ago

The same way you would for left and top:
Code: [ Select ]
right:20px;

Post Information

  • Total Posts in this topic: 10 posts
  • Users browsing this forum: No registered users and 49 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.