473,503 Members | 2,159 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to collapse next to positive and negative margins

64 New Member
Hi

I have a problem in grasp of collapsing next to positive and negative margins , would you please desribe me what happened and how several next to margins that some of them are negative and some are positive are collapsed?

For example in this situation
Can anyone explain this example for me?
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <title>test page</title>
  4. <style type="text/css">
  5. li {margin-bottom: 20px;}
  6. ul {margin-bottom: -15px;}
  7. h1 {margin-top: -18px;}
  8. </style>
  9. </head>
  10.  
  11. <body>
  12. <ul>
  13. <li>first li</li>
  14. <li>second li</li>
  15. <li>third li</li>
  16. </ul>
  17. <h1>this is a division this is a division</h1>
  18. </html>
  19.  
  20.  
It's nice of you to help me , thanks alot.
Nov 5 '11 #1
0 1433

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

Similar topics

27
3128
by: Thomas Mlynarczyk | last post by:
Hello, I noticed that IE seems to put some kind of default margins on <li> elements and the only way to get rid of them seems to be asigning negative margins. To make things worse, IE5 and IE6...
3
3545
by: Dig314 | last post by:
I need to Total the amounts for each Property ID in a table. All the amounts are stored as positive in the database. Based on a transaction code, the amount should be added or subtracted. There...
3
28101
by: Ken Durden | last post by:
Is it possible to force positive values to have the + sign prefixed on them? double f1 = 1024.2; double f2 = -1024.2; string.Format( "{0:F}", f1 ); // +1024.2 string.Format( "{0:F}", f2 );...
0
1410
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
5
5776
by: BACON | last post by:
I'm just starting the process of reorganising my modest little website and cleaning up all the HTML, and the logical place to begin was with the homepage. I made a simple little ASP.NET control...
0
1380
by: Kevin Smith | last post by:
I have a need to align the baseline of some text with the baseline of text within an image as in the following snippet. <html> <body> Inside table, image is cropped. <table border="1"><tr><td>...
3
2920
by: Patient Guy | last post by:
For a long time, this page has been up and an embarrassment. http://tinyurl.com/ylcqum In Firefox, the table moves out of its parent container with the negative margin, but not in MSIE6. ...
5
2293
by: vbgunz | last post by:
/* * BEGIN EXAMPLES */ var text = 'A Cats Catalog of Cat Catastrophes and Calamities'; /*** * EXAMPLE 1: negative lookahead assertion logic ***/
4
2440
by: asedt | last post by:
Hi If you use negative margins to center a page page and if the screen is small the content get hidden outside the screen(window) at the left side and you cant scroll to it. Is it a common...
0
7205
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,...
0
7093
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7353
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7468
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...
0
5596
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4689
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...
0
3170
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1521
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
401
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...

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.