Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CSS Question... Probably Simple.

CSS Question... Probably Simple.
Thread Tools
Forum Regular
Join Date: Jan 2001
Location: Valencia, CA
Status: Offline
Reply With Quote
Sep 18, 2004, 12:53 PM
 
Hey there.

I'm just getting started with XHTML and CSS. Can someone have a look at this real quick and tell me how I can get the image to appear in the content box instead of dropping down below the bottom of it?

I'm using nested divs to do the shadow effect and one of the images uses a float css statement to get it to shrink to fit the image. I believe this is called a "float drop" but I'm not sure.

URL:
http://www.kochnook.com/test/index.php?page=photos

CSS file:
http://www.kochnook.com/test/kochnook.css

Any help would be most appreciated. Thanks!

-jbk
     
Dedicated MacNNer
Join Date: Nov 2001
Location: Are Eye
Status: Offline
Reply With Quote
Sep 18, 2004, 01:24 PM
 
div.shadow1 is floated and that removes it (and its children) from the document's flow. That is to say that its parent will not expand to contain it. Parent elements do not expand to contain elements that are floated or positioned absolutely.

So, you need to add some markup after the Muir Woods paragraph.

<div style="clear: both">&nbsp;</div>

That new div will manifest itself after the picture, and it will pull the parent down around it. You could also put the style in the style sheet, I typically use div.breaker { clear:both; }

Alternatively, you could replace the '&nbsp;' with '<div></div>' Both will achieve the same result. I typically use the nested div as opposed to the nbsp. Semantically speaking, neither are proper; but it works.
     
   
Thread Tools
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -5. The time now is 09:11 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2