473,765 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Gap between DIV and Container

KeredDrahcir
426 Contributor
I'm creating a box that had a container divsion and then an innner division for the content. However there is a gap of about ten pixel between the bottom of the container and a bottom of the inner divsion. I need them to be the same height since the inner divison has a image border that had to go all the way to the bottom.

CSS:
Expand|Select|Wrap|Line Numbers
  1. .my_div{
  2.     border: 0px solid #ffffff;
  3.     width: 272px;    
  4.     vertical-align: top;
  5.     padding-top: 0;
  6.     margin-top: 0;
  7.     padding-bottom:0;
  8.     margin-bottom: 0;
  9. }
  10.  
  11. .my_div div{
  12.     background: url(../images/column_bg.jpg) repeat-y;
  13.     padding: 0 0 0 0;
  14.     margin: 0 0 0 0;
  15. }
HTML:
Expand|Select|Wrap|Line Numbers
  1. <div class="my_div">
  2.   <div>
  3.     <h3>Title</h3>
  4.       <div><p>Contwnt</p></div>
  5.   </div>
  6. </div>
Can anyone suggest how to get both division the same height.
Jun 27 '11 #1
3 2518
ilya Kraft
134 New Member
Alright try this,

Expand|Select|Wrap|Line Numbers
  1. .my_div{
  2.     width:272px;    
  3.     vertical-align:top;
  4.     padding-top:0;
  5.     margin:0;
  6. }
  7.  
  8. .my_div div{
  9.     background: url(../images/column_bg.jpg) repeat-y;
  10.     padding:0;
  11.     margin:0;
  12. }
  13.  
And I think it could be that background image that is causing the problem, make sure that heights are adjusted so background image matches div's.
Jun 27 '11 #2
KeredDrahcir
426 Contributor
That hasn't made any difference. The background image needs to scroll to match the height of the division which can changes its height depending on what is put inside it.
Jun 28 '11 #3
KeredDrahcir
426 Contributor
I've solved it. I added on pixel of bottom padding onto the
.my_div div anf it's foxed it. Does anyone know why?
Jun 28 '11 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

2
1556
by: Maitre Bart | last post by:
What I want to perform is calling a member function of container 1 (CRunner), using as argument the value of a container 2 (CNames). The purpose is to transfer values from C2 into C1 using a specific C1 member function. Both containers contains the same number of elements (or at least, C1 is larger than C2). As suggested by S. Meyers (and others), I would like to use an STL algorithm instead of a custom loop. Let say I have the...
3
2634
by: jignesh shah | last post by:
Hi all, Is there a way to recover a single container if its been corrupted or mark bad without restoring whole tablespace? environment: db28.1/aix5.1/tsm/rs-6000. Regards Jignesh
9
1798
by: horizon5 | last post by:
Hi, my collegues and I recently held a coding style review. All of the code we produced is used in house on a commerical project. One of the minor issues I raised was the common idiom of specifing: <pre> if len(x) 0: do_something() </pre>
7
20012
by: toton | last post by:
Hi, I want a circular buffer or queue like container (queue with array implementation). Moreover I want random access over the elements. And addition at tail and remove from head need to be low cost. STL vector is suitable for removing form tail? or it is as costly as removing from middle? any other std container to serve this purpose? (note , I dont need linked list implementation of any container, as I want random access)
11
1685
by: food4uk | last post by:
Dear all : I am not good at programming, please give a hand. My data structure is very similar as an array. I actually can use the std::vector as container to organize my data objects. However, the behaviours of std::vector::iterator can not meet my requirements. I need to redefine the vector::iterator's behavious such as ++. It means "next position in the object sequence" in STL but now I redefine it to mean "next position within a 2-d...
2
2006
by: Daniel Lipovetsky | last post by:
I would like for an object to "report" to a container object when a new instance is created or deleted. I could have a container object that is called when a new instance is created, as below. class AnyObject: pass class Container: links = def add(self,other):
1
5932
by: Miked | last post by:
Hello: I'm relatively new to CSS, and I'm doing a site where I don't want to use any tables. I've gotten pretty far, and the site has the layout I want. My only problem is that I'm using the flot positional paremter a lot on containers, and it really seems to do what I want. Except when I put other containers in these containers, they don't expand vertically like I want. Here's the stylesheet:
18
1821
by: Goran | last post by:
Hi @ all! Again one small question due to my shakiness of what to use... What is better / smarter? private: vector<MyClass_t* itsVector; OR...
36
2038
by: Peter Olcott | last post by:
So far the only way that I found to do this was by making a single global instance of the container class and providing access to the contained class, through this single global instance. Are there any other no-overhead ways that a contained class can access its container? The obvious choice of passing (a pointer or a reference to the container) to the contained class is not a no-overhead solution, it requires both memory and time. I am...
0
9568
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10163
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5276
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.