iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Graphics & Design Discussion Forum Post your graphics design questions/comments/ideas in here. Ask questions, post tutorials, discuss trends and best practices. Sub-forum for website accessibility and usability.

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-03-2004, 05:00 PM
WebProWorld Pro
 
Join Date: Jul 2003
Location: NSW Australia
Posts: 170
freddieb RepRank 0
Default CSS & Layers

How many people are using layers with CSS for layout?
I am a Dreamweaver user and use layers all the time. Interested in how many others use them.
Doing this is easy with DW & layers:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Layer test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
.red { background-color: #FF3300}
.green { background-color: #009933}
.blue { background-color: #99CCFF}
.yellow { background-color: #FFFF00}
.purple { background-color: #663399}
.pink { background-color: #FFCCCC}
.brown { background-color: #993300}
-->
</style>
</head>
<body bgcolor="#FFFFFF">
<div id="Layer1" style="position:absolute; left:6px; top:13px; width:133px; height:122px; z-index:1" class="blue"></div>
<div id="Layer2" style="position:absolute; left:21px; top:27px; width:147px; height:135px; z-index:2" class="green"></div>
<div id="Layer3" style="position:absolute; left:36px; top:39px; width:141px; height:160px; z-index:3" class="red"></div>
<div id="Layer4" style="position:absolute; left:50px; top:49px; width:173px; height:158px; z-index:4" class="yellow"></div>Try it
<div id="Layer5" style="position:absolute; left:65px; top:58px; width:175px; height:156px; z-index:5" class="purple"></div>
<div id="Layer6" style="position:absolute; left:82px; top:70px; width:196px; height:162px; z-index:6" class="pink"></div>
<div id="Layer7" style="position:absolute; left:94px; top:83px; width:203px; height:167px; z-index:7" class="brown"></div>
</body>
</html>
Reply With Quote
  #2 (permalink)  
Old 02-03-2004, 05:45 PM
WebProWorld Veteran
 
Join Date: Jul 2003
Location: Bristol, UK
Posts: 521
carbonize RepRank 0
Default

Doing it in DW may be easy but have you checked the results in a wide selection of browsers? How will your page look to a search engine? or a text only browser?
__________________
Carbonize
Reply With Quote
  #3 (permalink)  
Old 02-03-2004, 05:50 PM
Dragonsi's Avatar
WebProWorld Veteran
 
Join Date: Dec 2003
Location: Wales (UK)
Posts: 343
Dragonsi RepRank 0
Default

carbonize has a good point, I have used layers on a clients site but found that some browsers displayed the layered images I used in ever so slightly different positions. In this particular case, the resulting different locations of the layers made little negative effect, so I kept them there. However, if the positioning of these layers was critical then I would of removed them.
__________________
www.westwalesweb.com
Website development & ICT solutions.
Reply With Quote
  #4 (permalink)  
Old 02-03-2004, 06:16 PM
southplatte's Avatar
WebProWorld Veteran
 
Join Date: Jul 2003
Location: Colorado
Posts: 358
southplatte RepRank 1
Default

I had at one time attempted use of layers. My thought was cool, positioning made easy.

to my dismay though, the differences I recieved from the browsers made my experiences extremely short lived. Even between IE5 and IE6 I found differences on the same page. Netscape was a beast of itself, though it usually displayed better than IE.

freddieb -- If you are using css, there is no need for layers really. You use the layers to specify your absolute and z-index position (as well as hight/width etc) in your example, however a better implementation would be to put the css in a separate file and specify the same absolute position and z-index for each section within it. All the other attributes can be used in the css sheet as well.
Reply With Quote
  #5 (permalink)  
Old 02-03-2004, 10:24 PM
WebProWorld Pro
 
Join Date: Jul 2003
Location: NSW Australia
Posts: 170
freddieb RepRank 0
Default CSS & layers

I normally put all of my CSS in an external file, but put it on the same page for this post.

I currently test in IE6, Netscape 7, Opera 7, and Mozilla Firebird. I tweak the layers if there are any differences, but find very few in these browsers.

I used to find diferences in Netscape 4, but don't even test in that now.
Reply With Quote
  #6 (permalink)  
Old 02-04-2004, 07:44 AM
WebProWorld Veteran
 
Join Date: Jul 2003
Location: Bristol, UK
Posts: 521
carbonize RepRank 0
Default

Yo ualso need to test in IE 5.5 as thats still a well used browser. I also know people that use Opera6 as they prefer it over 7.
__________________
Carbonize
Reply With Quote
  #7 (permalink)  
Old 02-04-2004, 01:33 PM
WebProWorld Pro
 
Join Date: Aug 2003
Location: California,USA
Posts: 294
drummin RepRank 0
Default

I found I had trouble use <div id> tags and layers.
When using <div class> tags I had no trouble at all.
Maybe someone can explain why layers don't always work in <div id> tags.
__________________
Hello everyone! Newbie. Self-taught. Loves writing web-code.
Reply With Quote
  #8 (permalink)  
Old 02-04-2004, 07:10 PM
WebProWorld Member
 
Join Date: Jan 2004
Location: Hollywood, CA
Posts: 88
spice RepRank 0
Default

Did you define them properly in your css?

classes are like this:
.class { whatever }

id's must be defined like this:
#id { whatever }

Don't mix the two formats or name them the same. Also, if you're using IDs, they should be uniquely named (otherwise they would be classes!)
__________________
I do stuff.
Reply With Quote
Reply

  WebProWorld > Site Design > Graphics & Design Discussion Forum

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

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



All times are GMT -4. The time now is 02:51 PM.



Search Engine Optimization by vBSEO 3.3.0