Jump to content

Why is heading overlapped by Div above it, despite 2em margin


barryg

Recommended Posts

Hello!

 

I am trying to style this page:

 

http://techno-french.com/french-news-room

 

and for the life of me, I cannot figure out why the H1 heading,

Learn French Online Free with Mots de L’actu

is partly obscured by the right floated div above it. I have tried putting 2em of bottom margin on the Div above, and then tried putting top margin on the Div containing the Heading. It works fine in Dreamweaver outside of Wordpress so I suspect the CSS is right, but inside of Wordpress, the heading slips under the Div above it. It's driving me crazy. I'm not expert, but this seems to be coded correctly.

 

Here's the code:

<div style="float: left; width:360px; height:467px;"><h2 style="text-align: center;">Top Stories: Le Progres</h2>[Wordpress shortcode for an advanced iFrame]</div><div style="float: right; width:517px; height:560px; margin-bottom: 2em;"><h2>Funny Helps Learning</h2>[Wordpress shortcode for an advanced iFrame}</div><div style="float: left; clear: both;"><h1 style="text-align: center; color: #0b00dd;">Learn French OnlineFree with Mots de L'actu</h1>TEXT</div>

Can anyone help me. I'm green, but not too green.

 

Barry

 

Link to comment
Share on other sites

It isn't just one image. There is a pile of divs there such as b-infos-wrp. You should search the CSS for absolute or relative positioning because that is usually how something ends up on top of something else.

Link to comment
Share on other sites

It isn't about an image.

 

Here's the answer I got from another forum:

 

<div id="ai-div-news7"> is set to height 560px as is its parent div, but above #ai-div-news7 there is an <h2> that is forcing #ai-div-news7 down.

 

Changing

 

<div style="float: right; width:517px; height:560px; margin-bottom: 2em;"> to <div style="float: right; width:517px; margin-bottom: 2em;"> fixes the problem.

 

 

Apparently the Div pushed down the iframe's content. When I take away a specific height, it allows the div to set its own height. I understand some, but not all of it. Thanks for your comment.

 

Barry

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...