SiteExperts.com Logo Home | Community | Developer's Paradise
User Groups | Site Tools | Site Information | Search
 Main Menu
 Forums
SiteExperts.com Forums
All Discussions

SiteExperts Feedback
The Lounge
Dynamic HTML
Site Design/ Critiques
HTML and CSS
XML Technologies
The Wireless Internet
Internet Explorer
Microsoft .NET
The Server
Technical Support

Sponsored Links

User Groups : Forums : SiteExperts : HTML and CSS :

Previous DiscussionNext Discussion
 <div> boxes

Hi,

I want to show a box that contains small boxes of data
#main is a bigger box that contains smaller boxes called #deatails.

The bigger box encloses the smaller boxes in internet explorer.
In moxilla, the bigger box has a small height (say 50 pixels)
and does not enclose the smaller boxes. Obviously, i cannot specify
the height of the bigger box in pixels as it is variable
Could you please suggest a solution?

Thank you very much in advance.

Please take a look at the code
css:
#main
{
padding:15px;
width: 763px;
border: 3px solid silver;
background-color: rgb(250,254,254) ;
border: 1px solid lightsteelblue ;
}


#details
{
border: 1px solid rgb(250,254,254) ;
padding:7px;
width: 238px;
height: 120px;
float:right;
background-color: white ;
}



html:


loop start-

a few lines of data

loop end-


Started By emsiva on Dec 5, 2006 at 8:07:51 AM

10 Response(s) | Reply

Earlier Replies | Replies 1 to 3 of 10 | Later Replies
Goto Page: 2 1
Jockrock on Dec 5, 2006 at 6:23:20 PM (# 1)

Create an additional div to always follow the detail divs. In other words always after the loop like so:

<div id="main">
  <div id="details">Content for  id "details" Goes Here</div>
  <div id="details">Content for  id "details" Goes Here</div>
  <div id="details">Content for  id "details" Goes Here</div>
  <div id="details">Content for  id "details" Goes Here</div>
  <div id="details">Content for  id "details" Goes Here</div>
  <div id="basement"> Basement</div>
</div>

Call the new div "basement" (or whatever) and create a style as follows:

#basement{
 clear:both;
 visibility: hidden;
}

Of course it doesn't need to be hidden. It could be a visible footer. Hope that helps.


bod1467 on Dec 6, 2006 at 2:19:49 AM (# 2)

Several divs with the same ID? Or did you mean to use class="details" and change the CSS declaration from #details to .details? :-)


emsiva on Dec 6, 2006 at 2:54:36 AM (# 3)

Jockrock: Thanks for your suggestion :)
The height of the bigger box works perfectly well in both
IE and mozilla(if i put absolutely nothing in the basement div). However, the padding for the main on the right side is higher than 15px for either of the browsers, If i give calculated values for width and padding or even play around with values. Could you please say how i can fix this problem?.

bod: what is the problem if the details div have the same name?


Earlier Replies | Replies 1 to 3 of 10 | Later Replies
Goto Page: 2 1

To respond to a discussion, you must first logon.

If you are not registered, please register yourself to become a member of the SiteExperts.community.

User Name
Password
Copyright 1997-2004 InsideDHTML.com, LLC. All rights reserved.