Solved

Text appearing overtop image which is set to float:left in Safari browser only

Posted on 2014-02-20
4
225 Views
Last Modified: 2014-02-20
See attached screenshot, my client is seeing <h1> content overtop of an image which is set to float:left. This appears to happen ONLY in my client's Safari browser on a MacBook Pro. I also have Safari on a MacBook Pro, I cannot duplicate this problem… in that browser, or five others (Windows and Macintosh).

I've gone over the HTML and CSS extensively… I cannot see anything wrong with it! I tried inspecting it with Developer Tools, everything looks fine. I would really appreciate if anyone could help shed some light on this. Why one particular browser?

Thank you!

HTML:

<div id="content3bg">
	<div id="content3wrap" class="clearfix">
		<ul id="menu3">
			<li>HAMS</li>
			<li><a href="http://bbdesign.com/berksfoods.com/recipes-hams.htm">Featured Recipes</a></li>
		</ul>
		<div class="content3div">
			<div class="recipeblock clearfix">
				<img src="img/ph_recipes-hams-0001.jpg" alt="Pineapple-Ginger-Lime Ham" />
				<h1>Pineapple-Ginger-Lime Ham</h1>
				<p>Lorem ipsum master walkie havenport.</p>
				<div class="recipebottom">

...

					<table>
						<tr>
							<th>PREP</th>
							<th>COOK</th>
							<th>READY IN</th>
						</tr>
						<tr>
							<td>10min</td>
							<td>30min</td>
							<td>40min</td>
						</tr>
					</table>
				</div>
			</div>

...

		</div>
	</div>
</div>

Open in new window


CSS:

div#content3bg{background:#fff url('../img/bg_content3.jpg') repeat-x top center;}
div#content3wrap{width:974px;margin:0 auto;padding:24px 0 90px 0;}
ul#menu3{float:left;margin:0;padding:0;width:208px;list-style-type:none;}
div.content3div{float:left;width:726px;min-height:382px;margin:0;padding:21px 0 9px 40px;color:#635233;background:transparent url('../img/bg_content3_divider.png') repeat-y left top;font-family:Georgia,Times,'Times New Roman',serif;}
div.recipeblock{position:relative;margin-bottom:30px;}
div.recipeblock img{float:left;margin-right:30px;}
div.recipebottom{position:absolute;left:363px;bottom:0;}
h1{margin:-5px 0 9px 0;padding:0;color:#9d0c11;font-family:Georgia,Times,'Times New Roman',serif;font-size:2em;font-weight:normal;}

Open in new window

Screen-Shot-2014-02-19-at-10.57..png
0
Comment
Question by:bbdesign
  • 2
  • 2
4 Comments
 
LVL 58

Expert Comment

by:Gary
Comment Utility
Got a link?
0
 

Author Comment

by:bbdesign
Comment Utility
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
Comment Utility
Change your H1 margin to have a left margin of 360px
0
 

Author Comment

by:bbdesign
Comment Utility
That fixed it. I was concerned that it would add extra margin on all the other browsers, but that didn't happen. I still understand what was wrong with my code, but at least this is a workaround. Thanks!
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

"I want to put my photos online, but I don't want them stolen.  What settings should I use?" When You Put Photos Online First and foremost, any digital file published on the WWW can be copied, stored, modified, retransmitted, etc.  Remember Naps…
Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now