Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
[ CSS ], Div layer - float throws out of doc. flow
Old 12-10-2006, 08:10 PM [ CSS ], Div layer - float throws out of doc. flow
rab
Average Talker

Posts: 21
Trades: 0
http://0xdeadbeef.i8.com/Untitled-1.html

Thats my temp. site just to host my files. I've asked some friends to view the site with the same browser that i view it in and they showed pictures of my current projects box just thrown into the news section. I don't know how to fix or address this issue because i can't produce it. I also feel as if there is some CSS that is not needed here also and the content doesnt look centered at all. Can someone look over my source and give some help/fixes and etc. ?


Thanks, rab
rab is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-10-2006, 08:46 PM Re: [ CSS ], Div layer - float throws out of doc. flow
bigfreak's Avatar
Extreme Talker

Posts: 179
Name: Andy
Trades: 0
i don't know that much about css, but i'm getting better.

I find your code very confusing and hard to follow.

One of the best things I ever did was download the web developer pluging for Firefox. It gives you a real time CSS editor that allows you to make changes to the css and see what it does live. Of course this does not over-write your site, you can just copy and paste the code into your program.

I would suggest cleaning up the css, putting each item together instead of spread out so much.


again, please keep in mind that I myself am new at this!

good luck!
bigfreak is offline
Reply With Quote
View Public Profile
 
Old 12-11-2006, 12:02 PM Re: [ CSS ], Div layer - float throws out of doc. flow
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Quote:
they showed pictures of my current projects box just thrown into the news section.
Yep, that's what I see in Firefox.

You've got a serious case of div-itis there. Using divs where you should be using actual headings (h1-h6) is not a good idea. Search engines LIKE Headings.

In looking at your layout, You have basically 1 column, #content, and you're floating elements around inside it. You might want to consider making it a true 2-column layout and wrapping your projects info inside that 2nd column.

What you need to do is move this whole section:
Quote:
<div id="current-projects">
<span class="title-top">
current
</span><br>
<span class="title-bottom">
projects...
</span>
<ul id="projects">
<li><a href="javascript:insertStats(23, 'xyz1')" id="xyz1">Recode Portfilio</a></li>
<li><a href="javascript:insertStats(24, 'xyz2')" id="xyz2">Fix xyz.com bug</a></li>
<li><a href="javascript:insertStats(25, 'xyz3')" id="xyz3">Create xyz script</a></li>
<li><a href="javascript:insertStats(26, 'xyz4')" id="xyz4">Do xyz to zyx</a></li>
</ul>
</div>
to sit INSIDE the #latest-proejct div.. then you can remove all the extra float:right declarations.
Quote:

<div id="latest-project">
<div id="project-title">
<span class="title-top">
latest
</span><br>
<span class="title-bottom">
project...
</span>
</div><!-- close project-title -->
<div id="project-content">
<img src="Untitled-1_files/latest.png" alt="Latest Project" id="project">
</div><!-- close project-content -->
<div id="current-projects">
<span class="title-top">
current
</span><br>
<span class="title-bottom">
projects...
</span>
<ul id="projects">
<li><a href="javascript:insertStats(23, 'xyz1')" id="xyz1">Recode Portfilio</a></li>
<li><a href="javascript:insertStats(24, 'xyz2')" id="xyz2">Fix xyz.com bug</a></li>
<li><a href="javascript:insertStats(25, 'xyz3')" id="xyz3">Create xyz script</a></li>
<li><a href="javascript:insertStats(26, 'xyz4')" id="xyz4">Do xyz to zyx</a></li>
</ul>
</div>
</div><!-- close latest project -->
You also need to understand that floats ARE removed from the document flow, that's how they work AND that the order that you put your floated elements into your HTML DOES matter.

You also have to make sure you CLEAR your floats or you will have more unwanted results.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to [ CSS ], Div layer - float throws out of doc. flow
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32400 seconds with 12 queries