logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > HTML and CSS
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 05-21-2012, 08:49 PM   #1
krifer
 
Join Date: May 2012
Posts: 2
Exclamation Float error, please help!

I'm not very familiar with css at all so I'm not sure what I'm looking for but I've been playing around with the float, clear, margins, everything and nothing seems to work. Nothing is lining up, everything is bumping down to the next line when its viewed in a browser but looks fine in Dreamweaver.
The code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
#body {
background-color: #099;
clear: both;
height: 750px;
width: 1000px;
position: relative;
overflow: hidden;
left: auto;
top: auto;
right: auto;
bottom: auto;
margin: auto;
}
#4 {
float: left;
height: 36px;
width: 45px;
}
#1 {
float: left;
height: 46px;
width: 1000px;
}
#5 {
float: left;
height: 36px;
width: 49px;
}
#2 {
float: left;
height: 36px;
width: 873px;
}
#6 {
float: left;
height: 88px;
width: 1000px;
}
#7 {
float: left;
height: 35px;
width: 59px;
}
#8 {
float: left;
height: 33px;
width: 171px;
}
#9 {
float: left;
height: 35px;
width: 175px;
}
#3 {
float: left;
height: 36px;
width: 33px;
}
#10 {
float: left;
height: 35px;
width: 181px;
}
#11 {
float: left;
height: 35px;
width: 175px;
}
#12 {
float: left;
height: 35px;
width: 180px;
}
#13 {
float: left;
height: 35px;
width: 59px;
}
#14 {
float: left;
height: 495px;
width: 1000px;
}
-->
</style>
</head>

<body>
<div id="body">
<div id="1"><img src="images/index_01.jpg" width="1000" height="46" /></div>
<div id="2"><img src="images/index_02.jpg" width="873" height="36" /></div>
<div id="3"><img src="images/index_03.jpg" width="33" height="36" /></div>
<div id="4"><img src="images/index_04.jpg" width="45" height="36" /></div>
<div id="5"><img src="images/index_05.jpg" width="49" height="36" /></div>
<div id="6"><img src="images/index_06.jpg" width="1000" height="88" /></div>
<div id="7"><img src="images/index_07.jpg" width="59" height="35" /></div>
<div id="8"><img src="images/index_08_roll_08.jpg" width="171" height="35" /></div>
<div id="9"><img src="images/index_09.jpg" width="175" height="35" /></div>
<div id="10"><img src="images/index_10.jpg" width="181" height="35" /></div>
<div id="11"><img src="images/index_11.jpg" width="176" height="35" /></div>
<div id="12"><img src="images/index_12.jpg" width="179" height="35" /></div>
<div id="13"><img src="images/index_13.jpg" width="59" height="35" /></div>
<div id="14"><img src="images/index_14.jpg" width="1000" height="495" /></div>
</div>
</body>
</html>
krifer is offline   Reply With Quote
Old 05-21-2012, 11:41 PM   #2
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

ID's or classes can't be only numbers or starting with a number. They get ignored by browsers. Give them proper names and ending with numbers is fine.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Old 05-22-2012, 12:10 AM   #3
krifer
 
Join Date: May 2012
Posts: 2
Default Perfect!

Quote:
Originally Posted by gentleone View Post
ID's or classes can't be only numbers or starting with a number. They get ignored by browsers. Give them proper names and ending with numbers is fine.


Wow that was such a silly mistake on my part! Thanks so much!
krifer is offline   Reply With Quote
Old 05-23-2012, 12:35 PM   #4
gentleone
gentleone's Avatar
 
Join Date: Nov 2009
Location: Rhodes, Greece
Posts: 2,837
Default

Quote:
Originally Posted by krifer View Post
Wow that was such a silly mistake on my part! Thanks so much!
You're welcome and we all learn by making mistakes.
__________________
www.gentlemedia.nl
gentleone is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:04 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com