Solved

float word wrap problem in internet explorer

Posted on 2004-10-17
2
1,459 Views
Last Modified: 2008-02-01
http://www.soloenterprises.org/testcss.php
http://www.soloenterprises.org/solostyle1.css

My borders break in IE when using a nested float to word wrap images.  I would like to know if there is a workaround for this as it displays perfectly in FF et all.  I would rather not import different style sheets by browsers.

Some good links on this problem would be great.  

thanks

0
Comment
Question by:livegirllove
2 Comments
 
LVL 3

Accepted Solution

by:
Kupi earned 500 total points
ID: 12334294
Hi livegirllove,
when you use floating divs you have to add a clearing element to prevent visualization errors, for detailed info please see:
http://www.positioniseverything.net/easyclearing.html

To fix the problem, replace your code with the following:

<div class="content">
  <div style="float: left; margin: 0px 10px 0px 0px; width: 60px;"><img src="images/serviceimage.gif" alt="Orange County Computer Service" width="58" height="66" style="display: block;"></div>
  <h2>Orange County Computer Service</h2>
  microsoft certified<br>
  14 years exp.<br>
  guaranteed work
</div>
<div class="content">
  <div style="float: left; margin: 0px 10px 0px 0px; width: 60px;"><img src="images/webdesignimage.gif" width="62" height="65" alt="Orange County Web Design" style="dispaly: block;"></div>
  <h2>Orange County Web Design</h2>
  high quality<br>
  ease of use<br>
  lowest prices
</div>
<div class="content">
  <div style="float: left; margin: 0px 10px 0px 0px; width: 60px;"><img src="images/hostingimage.gif" width="34" height="83" alt="Orange County Web Site Hosting" style="display: block;"></div>
  <h2>Orange County Web Site Hosting</h2>
  99.999% uptime<br>
  linux/redhat<br>
  daily backups
</div>

And in the CSS:

.content {
  clear: both;
  position:relative; /* Position is declared "relative" to gain control of stacking order (z-index). */
  width:auto;
  min-width:120px;
  margin:0px 210px 20px 170px;
  border:1px solid black;
  background-color:white;
  padding:10px;
  z-index:3; /* This allows the content to overlap the right menu in narrow windows in good browsers. */
  height: 1%;
}

.content:after {
  display: block;
  visibility: hidden;
  clear: both;
  content: ".";
  height: 0px;
}

Kupi
0
 
LVL 1

Author Comment

by:livegirllove
ID: 12334370
Perfect!!
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jQuery scrollTop 2 48
How to make interactive HTML code pages like w3school or Codecademy? 3 41
Configuring a checkbox in CSS and php 18 87
How to position loader with CSS 3 35
"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…
Unordered lists (HTML ul tags) are very handy to create menus of all types, shapes and sizes.  All it takes is a little knowledge of CSS and the possibilities are endless. First off, you should know the general format for menus created using the …
In this Micro Tutorial viewers will learn how to create a CSS image sprite (In a later tutorial, viewers will learn how to use CSS and HTML to create a navigation menu using this sprite) Open a new Photoshop document with a width of (Icon width)x(N…
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…

816 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

10 Experts available now in Live!

Get 1:1 Help Now