Topic: Problems with nesting divs Pages that link to <a href="https://ozoneasylum.com/backlink?for=26465" title="Pages that link to Topic: Problems with nesting divs" rel="nofollow" >Topic: Problems with nesting divs\

 
Author Thread
RhyssaFireheart
Paranoid (IV) Inmate

From: Out on the Sea of Madness...
Insane since: Dec 2003

IP logged posted posted 08-16-2005 10:26 Edit Quote

And looking at this code to figure out the problem is giving me a serious headache.

I'm having issues with my divs nesting properly. Actually, they aren't nesting at all in a few cases and it's seriously starting to piss me off, because it was working fine, and then it broke somewhere and I can't find it. All my tags are correct (I think), I have the proper closers for everything, but things still aren't working properly. I've even removed some of the enclosing divs I had to separate the 3 main areas of the page out and it's still not working.

Here is the page in question as I have it right now - http://coeurdefeu.com/gamergod/layouts/rebuild_layout_v2.htm

Here is the CSS that goes with that page - http://coeurdefeu.com/gamergod/layouts/gg_rebuild_v2.css

First things to note - the CSS is in progress.. there are some items in there that don't appear in the sample page because I removed them to try to fix the problem, and others that are leftovers from the original source that I haven't converted or gotten rid of yet. I actually started rewriting the code for the page to make it cleaner and not so messy. I'd like to avoid using tables period, but looking at so many of the different gaming sites (Gamespot, Gamespy, Warcry, Stratics, IGN) they all use tables in their layouts. There has to be a way to not go that route.

Here's an example of the isssues I'm having:

code:
<div id="main_news_block">
<div class="news_block_head">August 15, 2005</div>
	
		<div class="news_gaming">
		<div class="news_gaming_head">Latest Gaming News</div>
		<OL class="news_list">
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1536">Hero's Journey Preview</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1535">Knight Online Review</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1533">EVE Online: Cold War Edition</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1534">Tactica Online Preview</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1532">Trials of Ascension Preview</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1531">Tabula Rasa Preview</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1526">Star Wars Galaxies Interview with Lucas Arts Associate Producer Julio Torres</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1530">Star Wars Galaxies Fiction: Blackmoon Six, Chapter Six: Breaking Point</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1523">Preview of Twilight War</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1524">Neocron 2 Trial Is Back!</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1525">Funcom celebrates four year anniversary for Anarchy Online!</A> 
		  <LI><A href="http://www.gamergod.com/news_display.cfm?news_id=1527">Publish 19: Fan Fest Love!</A> </LI>

		</OL>
		</div>
</div>




Now, I wanted to put the top two boxes inside their own div, in order to keep them grouped properly. But if you look at the example, the first </div> is closing down the <div id="main_news_block"> for some reason, even though it doesn't belong to that tag in the heirarchy. I just can't figure out what the issue is. And staring at the code is driving me nuts. I need someone else to look at it for a while instead to see if they can find what I'm missing.

EDIT - Bah! Forgot to change my sigs here when I upgraded to my own domain.
_____________________

coeur de feu
Qui sème le vent récolte la tempête!

(Edited by RhyssaFireheart on 08-16-2005 10:28)

zavaboy
Bipolar (III) Inmate

From: f(x)
Insane since: Jun 2004

IP logged posted posted 08-16-2005 14:13 Edit Quote

Try adding <br clear="all" /> before closing the <div id="main_news_block">.

I use <br class="ca" /> and apply br.ca{ clear:both; line-height:0px; } to the stylesheet.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu