CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 18th, 2004, 01:24 PM
stewharr stewharr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Georgia
Posts: 6 stewharr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to stewharr Send a message via Yahoo to stewharr
Absolute Positioning with DIV in XHTML Transitional doc

Hello,
I am trying to place a layer on an XHTML transitional page that is 40 pixels from the top and 264 pixels from the left. When I have the DTD tag in place the browser ignores the top and left attributes of my style, but comment it out and it works. Here is the code snippet. Any tips?
Quote:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<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;
top: 40;
left: 264;
}
</style>
</head>
<body>
<div id="Layer1">content</div>
</body>
</html>

Reply With Quote
  #2  
Old June 18th, 2004, 01:55 PM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,659 kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level)kk5st User rank is Brigadier General (60000 - 70000 Reputation Level) 
Time spent in forums: 1 Month 3 Days 11 h 50 m 18 sec
Reputation Power: 687
XHTML is case sensitive. Layer1 ≠ layer1

cheers,

gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

My html and css workshop, demos and tutorials.
Ask a better question, get a better answer.

Reply With Quote
  #3  
Old June 18th, 2004, 02:00 PM
stewharr stewharr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Georgia
Posts: 6 stewharr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to stewharr Send a message via Yahoo to stewharr
Quote:
Originally Posted by kk5st
XHTML is case sensitive. Layer1 ≠ layer1

made no difference in the outcome. Still not positioning the layer where I want it. Thanks.

Reply With Quote
  #4  
Old June 18th, 2004, 02:52 PM
stewharr stewharr is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2003
Location: Georgia
Posts: 6 stewharr User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to stewharr Send a message via Yahoo to stewharr
I just figured it out myself. I noticed that I didn't specify the top and left properties to be in pixels (px), without the DTD the browsers must have assumed pixels allowing for sloppy coding, with the DTD they did not. I changed this to px and it worked. Thanks.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Absolute Positioning with DIV in XHTML Transitional doc


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT