Web Hosting Talk







View Full Version : What's wrong with my CSS?


Blankwire
01-28-2006, 02:48 PM
I'm designing a simple website for my mom's business, and I'm getting some problems with my layout.

This (http://img369.imageshack.us/img369/5103/web11jr.jpg) is what it looks like now.

I want the green box to float to the left of the paragraphs, the copyright section to go to the bottom, and the border (under the heading) to go under the paragraphs.

I'm not even going to start with IE. :crying:

Here's the source. Anyone think they can tidy this up a bit? I'd really appreciate it.

Tranix
01-28-2006, 03:12 PM
URL please

Blankwire
01-28-2006, 03:43 PM
URL please
There is no URL, which is why I supplied the source.

WebDesignGold
01-28-2006, 11:08 PM
The following is a very rough "remix" of your code. It works both in IE and FX.
I'm not sure if this is how you want it look like. And I'm not assuming I did it the right way. I'm still learning CSS myself.

CSS Code:
html, body {
margin: 0;
}
p {
font-family: sans-serif;
color: #515A5F;
font-size: small;
text-align: left;
}

#footer {
font-family: sans-serif;
color: #515A5F;
font-size: small;
text-align: center;
width: 600px;
padding:5px;
margin-left: 25px;
clear: both;
}

h3 {
font-family: sans-serif;
color: #515A5F;
text-align: left;
margin: 0;
}

img {
border: 0;
}

.container {
margin:0;
}

.float {
float: left;
text-align: left;
width: 50%;
padding: 5px;
margin-left: 25px;
border-bottom: dashed 1px;
}

.box {
float: left;
padding: 2px;
margin: 200px 0 0 10px;
background-color: #8DCA89;
border: solid 1px #40A639;
width: 20%;
}

a.nav:link {color: #666; text-decoration: none; font-weight: bold}
a.nav:visited {color: #666; text-decoration: none; font-weight: bold}
a.nav:active {color: #666; text-decoration: none; font-weight: bold}
a.nav:hover {color: #FF9900; text-decoration: underline; font-weight: bold}

a.help:link {color: #666; text-decoration: none; font-weight: bold}
a.help:visited {color: #666; text-decoration: none; font-weight: bold}
a.help:active {color: #666; text-decoration: none; font-weight: bold}
a.help:hover {color: #80C47B; text-decoration: underline; font-weight: bold}

a:link {color: #666; text-decoration: underline}
a:visited {color: #666; text-decoration: underline}
a:active {color: #666; text-decoration: underline}
a:hover {color: #333; text-decoration: underline}

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html>
<head>
<title>Innovative Counseling - Finding the Connection</title>
</head>

<link rel="stylesheet" type="text/css" href="style.css">
<link rel="shortcut icon" href="favicon.ico" >

<body>
<center>

<div class="box">
<p>At vver eos et accusam dignissum qui blandit est praesent luptatum delenit aigue excepteur sint occae. Et harumd dereud facilis est er expedit distinct. Nam libe soluta nobis eligent optio est congue nihil impedit doming id</p>
</div>
<div class="container">
<div class="float">
<img src="images/header.png" alt="Innovative Counseling">

<p><a class="nav" href="index.html">Home</a> | <a class="nav" href="services.html">Services</a> | <a class="nav" href-"contact.html">Contact Information</a> | <a class="nav" href-"about.html">About Us</a></p>

<h3>Header goes here</h3>


<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exercitation ulliam corper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem veleum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel willum lunombro dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>

<p>Li Europan lingues es membres del sam familie. Lor separat existentie es un myth. Por scientie, musica, sport etc., li tot Europa usa li sam vocabularium. Li lingues differe solmen in li grammatica, li pronunciation e li plu commun vocabules. Omnicos directe al desirabilitá de un nov lingua franca: on refusa continuar payar custosi traductores. It solmen va esser necessi far uniform grammatica, pronunciation e plu sommun paroles.</p>

<p>Ma quande lingues coalesce, li grammatica del resultant lingue es plu simplic e regulari quam ti del coalescent lingues. Li nov lingua franca va esser plu simplic e regulari quam li existent Europan lingues. It va esser tam simplic quam Occidental: in fact, it va esser Occidental. A un Angleso it va semblar un simplificat Angles, quam un skeptic Cambridge amico dit me que Occidental es.</p>

</div>
<div id="footer">Copyright &copy; 2006 by Innovative Counseling. All rights reserved.</div>
</div>

</center>
</body>
</html>