Solved

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

Posted on 2014-02-20
4
231 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
ID: 39873727
Got a link?
0
 

Author Comment

by:bbdesign
ID: 39873735
0
 
LVL 58

Accepted Solution

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

Author Comment

by:bbdesign
ID: 39875454
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Change javascript css 1 37
Wordpress "chart" plugin recommendation 7 58
Add image to into animation on website template 1 33
DataTables + iCheck + pagination Issue 2 44
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
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 tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

809 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