0

I'm working on my cargo collective website (http://www.omarayoub.com) and I'm trying to keep the top padding consistent across the different sections and pages.

My goal is to make the top padding of an image (or a headline) to be exactly 25px. This is proving difficult for the following reasons:

If I change the top margin to 0px in the:

.project_content img {
    margin:0px 15px 15px 0;

and the top padding to 0px in the:

.entry {
    border-top:1px solid transparent;
    clear:both;
    padding:0px 0 90px 0;

The first poster's padding works, as well as the second one. But the third poster (Twin Peaks) has no top padding at all. Also, the "About" image has no top padding either.

As a work around, I changed the top margin to -25px in:

.project_content img {
    margin:-25px 15px 15px 0;

and the top padding to 25px in:

.entry {
    border-top:1px solid transparent;
    clear:both;
    padding:25px 0 90px 0;

This way, the "About" image has the correct top padding, but the third poster (Twin Peaks) has no top padding at all. If there's no way to make all the top paddings = 25px, how can I at least fix the (Twin Peaks) one?

Omar
  • 39
  • 7

1 Answers1

1

The problem is not padding, but is because of a <br> tag in the html.

enter image description here

Ideally, you should remove that from the HTML, but following the comments above, it appears these are being added probably by the WYSIWYG editor and you can't stop them occurring.

So you could try hiding that <br> tag with CSS. This is not ideal, but it's a suggestion.

.project_content br:first-child {
  display: none;
}

Then remove your negative margin on the image.

davidpauljunior
  • 8,238
  • 6
  • 30
  • 54