View Full Version : I'm an old table maker.. is it safe to use layers?
Bubbletin
05-06-2007, 07:48 AM
I'm about to work on a new fresh project and it's looking beautiful in it's PSD form. However, I know it's going to be the usual hell to design it in tables. I'm thinking about popping that cherry and going to layers.
Call me old fashioned but I'm very worried that layers will not be displayed properly across IE and Firefox. I'm using Dreamweaver 8 to design and position my layers. I made a few test pages and it *seems* like a wonderful invention.
Can anyone tell me otherwise? Are layers truely safe to use? :o
Edit: Found an old 2000 article.. now I remember why I never upgraded. http://groups.google.com/group/macromedia.dreamweaver/browse_thread/thread/53299bee510ea25d/cad2876600a13f2d%23cad2876600a13f2d
Please understand I design webpages as a hobby, I can make some kickass designs in Photoshop but converting them to tables was always dreadful. If I can just put elements in tables then in layers and 'piece' them together instead of having to break a table down individual that would be great!
"Layers?" The <layer> tag has been deprecated for a long time, and indeed only ever existed in Netscape. However, I don't think that's what you mean.
djr33
05-06-2007, 09:32 AM
Perhaps "div layers"?
If you're talking about CSS-based designs, then yes, pretty much every browser you're going to encounter (read: every browser for the last decade) supports CSS to a workable degree, and there's no longer any reason to abuse the <table> tag.
I suggest abandoning DreamWeaver, though... it becomes a lot harder to create fluid layouts in WYSIWYG editors.
Bubbletin
05-06-2007, 11:52 AM
Didn't know there was a difference between layers and div layers. This is what Dreamweaver produces for me as default on a new page and so far it's working perfectly:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#Layer1 {
position:absolute;
width:200px;
height:115px;
z-index:1;
}
-->
</style>
</head>
<body>
<div id="Layer1"></div>
</body>
</html>
I find it hard to believe it would be this easy to build pages using 'div' just by dragging and seating the layers together, a lot easier than using tables! Does the code above look safe to render across Firefox and IE?
Regarding Dreamweaver I've been using it since it's baby versions and it's rarely let me down -- takes care of a lot of the redundant coding work. Has it really be abandoned by the developer community?
Does the code above look safe to render across Firefox and IE?Depends how you define "safe." It will, but it's an excellent example of how not to construct web pages, using absolute positioning. This is exactly why WYSIWYG editors are bad. You might, for example, want a two-column site, with a sidebar down the left and then a large content area. However, the editor doesn't know this. When you drag those <div>s into position, all it knows is that you want two <div>s of these pixel co-ordinates. Likewise, it can't tell if you want them to resize themselves to match the font size, the viewport size, &c. Thus, you end up with a fragile fixed layout like that one, that doesn't adjust itself at all well to different displays.
Furthermore, it's producing XHTML by the looks of that <meta> tag, but XHTML is not currently supported by IE. On top of that, the comment tags inside the <style> element will cause your page to be a complete mess if ever it were to be rendered as true XHTML (rather than error-corrected into HTML, an ugly and dangerous practice (http://www.hixie.ch/advocacy/xhtml)). In XHTML, unlike in HTML, the comments are not ignored in <style> blocks, so the whole stylesheet will appear to be non-existant to the browser.
Regarding Dreamweaver I've been using it since it's baby versions and it's rarely let me down -- takes care of a lot of the redundant coding work. Has it really be abandoned by the developer community?It was never accepted by them -- its WYSIWYG features, at least. A lot of the things it "takes care of" are far from redundant.
Bubbletin
05-06-2007, 12:28 PM
I understand what you mean (at least I assume so). Fortunately I'm not worried about forging a dynamic layout that will expand and contract depending the user's real estate. I'm personally looking for an easier way to take spliced image 1 and spliced image 2 and put them together without combating too many table cells.
Now that I'm further educated (thank you Twey) I believe my question is this: Does absolute positioning through div 'layers' render properly across modern user's browsers or should I stick to using tables? Dynamic isn't my interest, actually, I don't want the layers to move at all!
Thank you for replying so quickly and sharing the wisdom.
Now that I'm further educated (thank you Twey) I believe my question is this: Does absolute positioning through div 'layers' render properly across modern user's browsers or should I stick to using tables?Certainly it does. If you're looking for a completely rigid design, though, you should rethink it, especially when it's based on pixels. Have you considered how poor this will look on a mobile device?
Bubbletin
05-06-2007, 12:52 PM
The type of site I'm building you wouldn't want to view on a mobile device heh but thank you very much for all the information I surprisingly learned alot from these few posts. I'll look into both ends of the pond and see how I can't construct future pages to be more dynamic and rely less on images and more on code.
mburt
05-06-2007, 12:56 PM
Also, using pixel layouts will cause them to overlap when resizing, or viewing at different resolutions.
Bubbletin
05-06-2007, 01:03 PM
Also, using pixel layouts will cause them to overlap when resizing, or viewing at different resolutions.
I tested a few pages out using images in tables then in layers and tried resizing and different solutions across IE and Firefox and saw no difference. Could anyone explain further about this 'overlap' please?
No, this occurs when mixing absolute and relative units. If you base your whole site on pixels it won't matter.
mburt
05-06-2007, 01:32 PM
Oops... That's what I meant :D.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.