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 8th, 2004, 03:46 AM
ktoz ktoz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 473 ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 4 h 51 m 32 sec
Reputation Power: 35
</div> not reverting to parent div position info

I defined several css styles to be nested within an overall "pageBlock" style and some of the nested divs don't seem to revert to the settings of the parent pageBlock div after a </div>. Safari is the only browser that does what intuitively I think should happen. IE, OmniWeb, FireFox, iCab all do their own squirrely things.

In general though, in all browsers except Safari, elements are being positioned not relative to the parent (pageBlock) but relative to left edge of the item directly above them. This causes them to get farther and farther from the left edge of the page the more blocks are used.

Is this rightward creep what's "supposed" to happen and it's Safari that's getting it "wrong"?

Thanks

Ken


Here's the styles:
Code:
.pageBlock  { 
	margin-right: auto; 
	margin-left: auto; 
	top: 32px; 
	width: 80%; 
	height: auto 
}

.indentBlock { 
	color: black; 
	font-size: 14px; 
	line-height: 18px; 
	font-family: "Times New Roman", Georgia, Times; 
	text-align: left; 
	padding-bottom: 4px; 
	position: relative; 
	top: 8px; 
	left: 32px
}

.imageBlock { 
	padding-bottom: 8px 
}


And here's how I'm using them...
Code:
<div class="pageBlock">
	<p>bla bla bla</p>
	
	<div class="indentBlock">
		<p>rah rah rah</p>
	</div>
	
	<p>cha cha cha</p>
	
	<div class="indentBlock">
		<p>rah rah rah</p>
	</div>
</div>

Reply With Quote
  #2  
Old June 8th, 2004, 03:18 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,674 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 15 h 15 m 50 sec
Reputation Power: 687
Hmm. I didn't try this code, but I would expect a rendering similar to your Safari description. Relative position is referenced to its normal position in the flow, not its parent element. One thing to correct is the parent div. A positioned element must descend from a positioned element. So as far as the "indentBlock" is concerned, its positioned parent is not "pageBlock" but it nearest positioned ancestor—likely <body>. I would look closely for a syntax error like a missing closing tag or missing quote.
If the problem persists, post a live link for us to look at.

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.

Last edited by kk5st : June 8th, 2004 at 03:22 PM.

Reply With Quote
  #3  
Old June 9th, 2004, 12:17 AM
ktoz ktoz is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2003
Posts: 473 ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level)ktoz User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 4 h 51 m 32 sec
Reputation Power: 35
Strange, I just launched all my test browsers and they are all rendering the divs as expected except for IE (and iCab which doesn't support css)

I don't remember changing a thing. Divs are cool! They heal themselves! Now if someone could write self healing C/Objective C...

Thanks for the response,

Ken

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > </div> not reverting to parent div position info


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 6 hosted by Hostway
Stay green...Green IT