» Home » margin » Page 1
Margin left/right auto and 900px width is positioning with extra wide margin on the iPad/iPhone only
Category : 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;
}
<body>
<div class="wrapp

View Replies


How can I make the bottom margin of a div equal to its percentage-calculated right margin?
Category : 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


View Replies


Android: margin/padding for the ListView without having the margin applied to the header?
Category : 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


View Replies


CALayer resizing with flexible width, left margin and right margin
Category : 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


View Replies


Flex-box ignores wrapped children's margin (margin collapse)
Category : Web Design

Given the following HTML:


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

and the following CSS (prefix free):


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

View Replies


How to Format a Letter Using a Default Left & Right Margin & a Two Inch Top Margin
Category : 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

View Replies


margin-top and margin-bottom inside floated div not working
Category : 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:
http://jsfiddle.net/zTb3g/


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


View Replies


Find first element in div that has margin? (purpose: remove margin)
Category : 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


View Replies


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

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


.item {
position:absolute;
top:50%;
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


View Replies


Add margin left after second div and margin should get increase double
Category : Programming Languages

Need to Add margin left after second div and margin should get doubled.


FOR EXAMPLE:
3rd li margin left - 220
4rd li margin left - 440
and so on.


<ul>
<li id="new-1">1</li>
<li id="new-2">2</li>
<li id="new-3">3</li>
<li id="new-4">4</li>
</ul>
$(fu

View Replies


Next
2012 / 2017 Copyrights BigHow , All Rights Reserved .