» Home » margin » Page 1
Margin left/right auto and 900px width is positioning with extra wide margin on the iPad/iPhone only
by The Merg in Programming Languages

The following profile maintains centering in the main browsers in OSX and WinXp. But is offset to the left in the iPad with the width shorten by the larger margin on the right.

.wrapper {
width: 900px;
margin-right: auto;
margin-left: auto;
position: relative;
border: 1px solid #9B9B9B;
<div class="wrapp

CALayer resizing with flexible width, left margin and right margin
by Mahi in Development Tools & Services

I added a sublayer to an existing layer and set its autoresizing mask to the following:

sublayer.autoresizingMask = kCALayerWidthSizable | kCALayerMaxXMargin | kCALayerMinXMargin;

Resizing works OK when making the layer bigger -- but making it smaller never changes the width.
This picture illustrates the problem:

Anybody seen this

How can I make the bottom margin of a div equal to its percentage-calculated right margin?
by mckasty in Programming Languages

I have an array of floating divs that fit 4 to a row. Their widths and right margins add up to 100%. Their bottom margins, however, are static. CSS below:

.item {
position: relative;
float: left;
height: 200px;
width: 23%;
margin-right: 2%;
margin-bottom: 15px;
background-color: #ddd;

Is th

Android: margin/padding for the ListView without having the margin applied to the header?
by cjdavis in Programming Languages

Is it possible to have a margin/padding for the ListView without having the margin applied to the header? I want my ListView to be like the Google Now layout. I've got everything working except for this little problem.

Question: Is it possible to not have layout parameters of the ListView apply to its header?

EDIT1:More info

The purple view is the header to t

Flex-box ignores wrapped children's margin (margin collapse)
by xSauronx in Web Design

Given the following HTML:

<div class="outer">
<div class="inner">A</div>
<div class="outer">
<div class="inner">B</div>

and the following CSS (prefix free):

.outer {
display: box;
box-orient: vertical

How to Format a Letter Using a Default Left & Right Margin & a Two Inch Top Margin
by Twista in Computers
Word processors allow the user to type virtually anything and fine-tune the formatting of documents with a few clicks of the mouse. Tasks from changing font color and type to setting margins take a fraction of the time they took with older, analog methods. However, to properly adjust the margins of a letter document, you must use the correct steps for your word processing software. These steps var

margin-top and margin-bottom inside floated div not working
by Bernhard in Web Design

I have a problem with margin-top and margin-bottom for some elements inside a floated div.

It's a column div floated to the right (I have also 2 other column divs floated to the left)

Demo here:

I need the "float" to adjust columns in the page, but the margin-top and margin-bottom don't work in some of the elements (ex: b, labe

How do negative margins in CSS work and why is (margin-top:-5 != margin-bottom:5)?
by New Jersey in Web Design

A common trick for vertical positioning elements is to use the following CSS:

.item {
margin-top:-8px; /* half of height */
height: 16px;

When seen in the metric view as in Chrome this is what you see:

However, there is no visual margin depicted when you hover over

Find first element in div that has margin? (purpose: remove margin)
by Brian in Web Design

I need to find the first (and last) element in a div that has a CSS margin set (> 0 px). (important: this is not necessarily the first or last element!)

Basically, I need to do this so that I can remove the margin-top for the first element and the margin-bottom for the last. Now I know you'll probably say "why not use "p:last" CSS syntax?"

Because the first or last eleme

What Is the Difference Between Contribution Margin & Operating Margin?
by ThF in Business
Company employees, managers and investors focus on the margin earned by the company. Different users refer to different calculations when discussing margin. These include profit margin, operating margin or contribution margin. The profit margin refers to the total income earned by the company. This considers income earned and expenses incurred from all sources of the company's operation. Contribut

Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .