margin-top and margin-bottom inside floated div not working


Bernhard
HOME ยป 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, 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.


Thanks


Related to : margin-top and margin-bottom inside floated div not working
margin-top and margin-bottom inside floated div not working
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, 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.


Thanks


Safari Margin Issue - not the negative margin on a floated element bug
Web Design

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 Safari in a windows environment, I do not have a Mac

The problem:
-in Safari the top margin on the content either is either not being applied at all or is being interpreted differently
-it may be of note that I was having the same issue with IE, but was able to specify an IE specific style sheet for it, I don't believe this is possible in Safari?

Live Example
http:

Bottom margin of blog posting (div w/ floated image)
Web Design

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 document flow, so the browser tries to apply the bottom margin to the short text instead of the image.
Is there a way to have a bottom margin on each blog post without having to use a presentational spacer div? Is there a better "best practices" way of doing things?
Thanks!
CSS
Floated element not included in parent, causing margin-bottom problems
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">President</span>
</div>
<abbr class="postdate">
<span class="month m-01">Jan</span>
<span class="day d-31">31</span>
<span class="year y-2009">2009</span>
</abbr>
<div class="content">
<h2 class="title">Article


HD Wallpapers
3D
3D Abstract
City
Celebrities
Indian Celebrities
Cars
Travel
Girls
Animals Birds
Movies
Sports
Black White
Nature
Planes
Anime
Food Drink
Dreamy Fantasy
Architecture
Games
Space
Holidays
Flowers
Love
Artistic
Baby
Beach
Bikes Motorcycles
Macro
Computers
Vector
Funny
Army
Textures
Brands
Misc
Music
Other
Privacy Policy - Copyrights Notice - Feedback - Report Violation - RSS 2017 © bighow.org All Rights Reserved .