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:

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, label, a), yet it works normally for other elements (ex: p, input).

I tried a lot of clearing styles in different places of the markup. Hope someone can help.


View Replies

Related to : margin-top and margin-bottom inside floated div not working

Safari Margin Issue - not the negative margin on a floated element bug
Category : Development

Background info:
- I have validated the page and CSS, no problems there
- Site is working properly in Firefox and IE, seems to be a margin issue in Safari
-This margin issue is not the common Safari bug with a negative margin being applied to a floated element
-I am using Safa

View Replies

Bottom margin of blog posting (div w/ floated image)
Category : Development
Ive experienced this problem for sometime and cant figure it out. Im trying to get each blog posting to have a 10px bottom margin, but when the text doesnt flow past the blog postings floated image, the bottom margin doesnt exist. Im assuming this is because a float is taken out of the normal docu

View Replies

Floated element not included in parent, causing margin-bottom problems
Category : Web Design

Right, so I've got a section of a page:

<div class="article">
<div class="author">
<img src="images/officers/john_q_public_thm.jpg" />
<span class="name">John Q. Public</span>
<span class="position">

View Replies

swf at 100% width/height with a left margin of 400px and a bottom margin of 200px?
Category : Webmasters
Please can someone tell me if it is possible to have a swf at 100% width/height with a left margin of 400px and a bottom margin of 200px? Have managed the left margin using:
<div style="height:100%;margin-left:400px;"> <div id="flashcontent"></div> </div

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%;

View Replies

Margin/Padding only working when floated?
Category : Development
I have this i want the little nav above the table to be positioned in the centre but with some spacing top and bottom.
Code CSS:

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 {
margin-top:-8px; /* half of height */
height: 16px;

When seen in the metric view as in Chrome this is wh

View Replies

Will the Screen fit to all devices if i use margin top's and margin bottom's in XML in Android
Category : Android

I am developing an application in which i need to use lot of text-views and i am using a relative layout.Since i positioned my text-views in different coordinates(margintop=20dp),will the layout fit for all the android devices(tabs,Nook color phones,normal devices etc)

Any suggestions

View Replies

What is the rationale behind margin-top: auto and margin-bottom: auto amounting to 0 margin?
Category : Web Design

Since margin-right: auto and margin-left: auto center an element horizontally, I would expect their vertical counterparts to behave in the same way.

Yet I understand this does not happen, as per CSS specs:

10.6.2 Inline replaced elements, block-lev

View Replies

Space below form (have tried margin:0 and bottom-margin:0)
Category : Web Design

Heya guys,
Hope someone can help me with this one. Been looking around the web but most are suggesting to do what i have already done.
I've got this in style.css file:


View Replies

2012 / 2017 Copyrights BigHow , All Rights Reserved .