Old 21-02-2010, 08:03   #1 (permalink)
Nfasfous
Registered User
 
Join Date: Jan 2010
Posts: 9
container height problems

Hello everyone, here's my problem, the elements aren't scaling according to the contents. i've attached two pictures to show you the problem. the first pic is taken from the web designing program which shows each element separately scaling, according to what it's holding inside it, and the second pic is from a browser... please help

in web design program img694.imageshack.us/img694/2977/programjj.jpg
in browser img94.imageshack.us/img94/195/browser.jpg

add h t t p:// in front of each link... thanks
  Reply With Quote
Old 21-02-2010, 08:08   #2 (permalink)
Zod
Ruler of Planet Houston
 
Zod's Avatar
 
Join Date: Feb 2010
Posts: 141
add this in your css:

hr{clear:both;}
  Reply With Quote
Old 21-02-2010, 10:40   #3 (permalink)
Nfasfous
Registered User
 
Join Date: Jan 2010
Posts: 9
img707.imageshack.us/img707/7717/clearboth.jpg

this is what it looks like, with clear:both

just to make sure, hr is the container of each piece of news, right?
  Reply With Quote
Old 21-02-2010, 10:43   #4 (permalink)
Starbright
Senior Member
 
Starbright's Avatar
 
Join Date: Feb 2007
Location: Leicester, UK
Posts: 5,913
How is anyone meant to help without seeing any code. This could be anything.
__________________
  Reply With Quote
Old 21-02-2010, 10:51   #5 (permalink)
Nfasfous
Registered User
 
Join Date: Jan 2010
Posts: 9
sorry, my bad

HTML Code:
<div class="content"><div class="subcontent"> <h1>The Articulate Baboon Gallery</h1> <p>In April 2010, Omar will be exhibiting his new work at the Articulate Baboon gallery located at the design center Designopolis in Cairo, Egypt. The gallery specializes in in graffiti and calligraphy.</p> </div><div class="subcontent"> <img class="sectionimage" src="sunnyartfair.jpg" width="250" height="188" /><h1>Sunny Art Fair</h1> <p>In December 2010, the Sunny Art Fair had its opening at the Zara Expo Center where several galleries and individual artists showcased their work. Omar Bilbeisi participated by presenting three paintings with two major galleries from Amman at the Art Fair.</p> </div><div class="subcontent"><img class="sectionimage" src="nabad.jpg" width="250" height="188" /><h1>Contemporary Calligraphic Art In The Arab World</h1> <p>On 14th December 2009, Omar Bilbeisi participated in the Contemporary Calligraphic Art in the Arab World exhibition held at the Nabad Art Gallery in Amman, Jordan with other Arab Artists specializing in calligraphy. The artwork exhibited all drew on the rich tradition of Arabic calligraphy, utilizing the Arabic script in new and creative ways, both in its abstract and traditional forms.</p> </div></div>

CSS

Code:
div.content { width:751px; margin-left:210px; padding:0; } .subcontent { width:751px; margin:0px; padding: 10px 0; border-bottom:1px gray solid; clear:both; } .sectionimage { margin:0 0 10px 10px; float:right; border:1px black solid; }

each subcontent contains 1 piece of news and a picture on the right.
  Reply With Quote
Old 21-02-2010, 10:55   #6 (permalink)
Starbright
Senior Member
 
Starbright's Avatar
 
Join Date: Feb 2007
Location: Leicester, UK
Posts: 5,913
That's not enough of the code to solve your problem, why not just post it all?
__________________
  Reply With Quote
Old 21-02-2010, 11:15   #7 (permalink)
taylormsj
Senior Member
 
taylormsj's Avatar
 
Join Date: Mar 2009
Location: Essex, UK
Posts: 295
add <br clear="all" /> just before the closing </div> of .subcontent.

That way the grey line will clear the image that is in the div
  Reply With Quote
Old 21-02-2010, 11:42   #8 (permalink)
Nfasfous
Registered User
 
Join Date: Jan 2010
Posts: 9
Thank you so much taylormsj, worked perfectly, thank you Starbright and Zod as well
  Reply With Quote
Old 21-02-2010, 11:52   #9 (permalink)
taylormsj
Senior Member
 
taylormsj's Avatar
 
Join Date: Mar 2009
Location: Essex, UK
Posts: 295
Your welcome
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive
Web Hosting by Heart Internet, vBulletin © 2000-2009 Jelsoft Enterprises Limited.
Search Engine Optimization by vBSEO 3.0.0 RC8
Web Hosting by Heart Internet