Another floating problem

I’m wanting to “float” the faultline image in the web page below in top of the left side nav bar and right side house image in this 2 column CSS template instead of inserting it above the nav bar and house image. And then the nav bar and house image should appear directly below the header. As you can see in the code, I tried using p.overlay but that didn’t work. I also tried giving the float property to img as suggested in a similar post but since I only want it to apply to the faultline logo image, I wasn’t sure how to do that.

Thank you for your help. Web page is at:

http://www.techsuitesolutions.com/dev/FixedCSS.html

Hi,

below in top of the left side nav bar and right side house image

I’m not exactly sure what you want to achieve here…

Perhaps you’re wanting to move the <img> into either leftColumn1 or content.

Also <p.overlap> is invalid HTML, you might have been wanting this <p class=“overlap”></p> ?

Am sorry for going off topic here… but…

I really would START ALL OVER FROM SCRATCH!!! If DS60 saw this he would have a stroke.
As mentioned above, IN THE HTML , elements with classes are written like this:

<p class="overlap"></p>

you dont actually NEED the HRs at all, semantically speaking and you are better off adding the underlines as H1,H2 {border-bottom:2px groove ;} ( heck you can stile different border for different elements this way!! But lets keep it simple for now;}

I also assume that the house image is not part of a story or content, but really branding ; that means it should be in the header.

I assume your left column will be a navigation? instead of a h2, you need to structure in an unordered list ( UL):
After that you can use padding and margin to create spacing between elements as desired ( instead of adding empty tags!!!) and font-weight, font-family …ect to style the text itself.

This is a rough solution but perhaps it will help you see what I meant by proper structure. I didnt clean up your CSS, I just added my changes at the bottom so you can see them clearly.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
	<head>
		<title></title>
<style type="text/css" media="all">
<!--
/* This rule resets a core set of elements so that they will appear consistent across browsers. Without this rule, content styled with an h1 tag, for example, would appear in different places in Firefox and Internet Explorer because each browser has a different top margin default value. By resetting these values to 0, the elements will initially be rendered in an identical fashion and their properties can be easily defined by the designer in any subsequent rule. */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  font-size: 100%;
}
/* The body is the outermost layout component and contains the visible page content. Setting properties for the body element will help to create consistent styling of the page content and more manageable CSS. Besides using the body element to set global properties, it is common to use the body element to set the background color of the page and create a centered container for the page content to display. */
body {
  background-color: #666;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11px;
  line-height: 14px;
  margin: 0 0 0 0; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
  padding: 0 0 0 0; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
  text-align: center; /* Centers the page content container in IE 5 browsers. */
}
/* Commonly used to style page titles. */
h1 {
	color: #000;
	font-size: 24px;
	font-weight: bold;
	line-height: 14px;
	font-family: "Times New Roman", Times, serif;
	font-style: italic;
}
/* Commonly used to style section titles. */
h2 {
	color: red;
	font-size: 16px;
	font-weight: bold;
	line-height: 14px;
	font-family: Verdana, Geneva, sans-serif;
	font-style: italic;
}
/* Sets the style for unvisited links. */
a,  a:link {
  color: #000;
  font-weight: bold;
  text-decoration: none;
}
/* Sets the style for visited links. */
a:visited {
  color: #000;
  font-weight: bold;
  text-decoration: none;
}
/* Sets the style for links on mouseover. */
a:hover {
  color: #000;
  text-decoration: underline;
}
/* Sets the style for a link that has focus. */
a:focus {
  color: #000;
}
/* Sets the style for a link that is being activated/clicked. */
a:active {
  color: #000;
}
/* This is a container for the page content. It is common to use the container to constrain the width of the page content and allow for browser chrome to avoid the need for horizontal scrolling. For fixed layouts you may specify a container width and use auto for the left and right margin to center the container on the page. IE 5 browser require the use of text-align: center defined by the body element to center the container. For liquid layouts you may simply set the left and right margins to center the container on the page. */
#outerWrapper {
  background-color: #fff;
  margin: 0 auto 0 auto; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
  text-align: left; /* Redefines the text alignment defined by the body element. */
  width: 780px;
}
/*background-color: #ebebeb originally for header and border-bottom #666 */
#header {
	background-color: #FFF;
	border-bottom: solid 1px #FFF; /* Sets the bottom border properties for an element using shorthand notation */
	font-size: 18px;
	font-weight: bold;
	line-height: 60px;
	padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
	text-align: center;
}
#leftColumn1 {
	background-color: #ebebeb;
	border-right: solid 1px #666; /* Sets the right border properties for an element using shorthand notation */
	float: left;
	padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
	width: 150px;
}
/* Contains the main page content. When using a mutliple column layout the margins will be set to account for the floated columns' width, margins, and padding. */
 #content {
	margin: 0 0 0 200px; /* Sets the margin properties for an element using shorthand notation (top, right, bottom, left) */
	padding: 0 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
/* Using floated elements and a clear float class is a common method to accomplish multiple column tableless layouts. If floated elements are used without being cleared the elements following will wrap around the floated element. This class should be applied to an element after the last floated element and before the close of the container with floated elements. */
#contentWrapper  {}
 #footer {
  background-color: #ddd;
  border-top: solid 1px #666; /* Sets the top border properties for an element using shorthand notation */
  padding: 10px 10px 10px 10px; /* Sets the padding properties for an element using shorthand notation (top, right, bottom, left) */
}
p.overlap {
	position:relative;
	top:-80px;
}






#contentWrapper{overflow: hidden}
h1 > span{display:block; }
#content  h1,  #content  h1 img{  margin-top: 0; padding-top:0}
H1,H2 {border-bottom:2px groove ;padding-bottom:.5em}
#header {position: relative;}
#header span.brand { position: absolute; width:560px; top:100%; left:200px}
#header span.brand img { display:block; max-width: 100%}
#content{padding-top:530px;}
--></style>
	</head>
	<body>
<div id="outerWrapper">
<div id="header">
	<img src="http://www.techsuitesolutions.com/dev/images/DLHeading.jpg" alt="David Leech, Inc" width="662" height="50" />
 	<span class="brand">	<img src="http://www.techsuitesolutions.com/dev/images/leechless.jpg" alt="remodeling contractors"    />
 		<img src="http://www.techsuitesolutions.com/dev/images/index.4.jpg"   alt="index" />
 		<img src="http://www.techsuitesolutions.com/dev/images/FaultLineheader.jpg"   alt="faultline seismic retrofit" /></span>
</div>
<div id="contentWrapper">
<div id="leftColumn1">
<ul class="mainNav">
<li> <a href="#">Fault Line Remodeling</a></li>
<li> <a href="#">Testimonials</a></li>
<li> <a href="#">About Us</a></li>
<li> <a href="#">Contact</a></li>
</ul>
<hr />
<p>Lorem ipsum dolor sit amet.... <a href="#">More...</a></p>
<!--leftCol--></div>
<div id="content"  >
      <h1> H1 Main Content</h1>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at,  odio. Donec et ipsum et sapien vehicula nonummy. Suspendisse potenti. Fusce  varius urna id quam. Sed neque mi, varius eget, tincidunt nec, suscipit id,  libero. In eget purus. Vestibulum ut nisl. Donec eu mi sed turpis feugiat  feugiat. Integer turpis arcu, pellentesque eget, cursus et, fermentum ut,  sapien. Fusce metus mi, eleifend sollicitudin, molestie id, varius et, nibh.  Donec nec libero. <a href="#">More...</a></p>
<h2>H2 level heading</h2>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Praesent aliquam,  justo convallis luctus rutrum, erat nulla fermentum diam, at nonummy quam  ante ac quam. Maecenas urna purus, fermentum id, molestie in, commodo  porttitor, felis. Nam blandit quam ut lacus. Quisque ornare risus quis  ligula. Phasellus tristique purus a augue condimentum adipiscing. Aenean  sagittis. Etiam leo pede, rhoncus venenatis, tristique in, vulputate at, odio. <a href="#">More...</a></p></div>
</div>  
<div id="footer">Footer</div>
</div>
	</body>
</html>


( I also got lazy… all the image links in my example are absolute… feel free to edit them back to relative paths)

You’re absolutely right, dresden_phoenix. That’s what I get for trying to do a quick layout. I usually do all coding by hand but this time I grabbed a template off the web and used a 3rd party extension in DW to modify it.

This customer is a contractor who does remodeling and originally used the house image as his logo. Then he added the service of retrofitting houses to withstand earthquake activity and wanted both sides of his business - common remodeling and retrofitting - to be reflected in his website with the faultline logo, that represents the retrofitting part, more prominently. Making it more prominent isn’t a problem because of the red color and the straight line look but it’s really difficult to design a cohesive overall “feel” using both logos because of the contrast between the two. I was hoping to have half of the home page describing the retrofitting service and half describing the remodeling service, side by side, with a narrower navigation bar that worked for both services on the left side. I wanted to overlap the faultline logo over the upper part of the nav bar and the upper part of the retrofitting content using z-indexing. I eventually wanted the seismic bolt line to continue, flat, over the top part of the house image and around it like a border to try and pull the two images together. It’s a stretch, I know.

I realize I should have just stuck with the handcoding from the beginning. However, I think the bigger problem is figuring out a design that lets the 2 parts (remodel/house and retrofitting/faultline) work together instead of fighting each other.

Thanks for reminding me to really be careful trying to use pre-made code and “shortcuts”.