Solved

CSS float problem

Posted on 2008-11-02
3
607 Views
Last Modified: 2012-06-27
I'm having a problem getting my columns to float properly. From the books I'm reading it seems like it's simple ... one div tag floats left and the other floats right, but mine aren't doing that. it's showing up underneath my float left. I need help...

http://www.bodyartforms.com/404error.asp
#Content {
	float: right;
	width: 85%;
}
 
#LEFTNAV {
	margin-top: 50px;
	float: left;
	width: 15%;
}
 
#LEFTNAV ul {
	margin: 0px;
	padding: 0px;
	list-style: none;
}
 
#LEFTNAV Li {
	background-color: #333366;
	margin: 1px;
}
 
#LEFTNAV li a {
	display: block;
	text-decoration: none;
	font-family: Verdana;
	font-size: 11px;
	font-weight: normal;
	color: #cccccc;
	padding: 3px 8px 3px 8px;
	}
 
 
 
<!--#include virtual="/inc_header_asp.asp" -->
<!--#include virtual="/inc_LeftNav.asp" -->
<div id="Content">
 <p class="LargeHeader"> Page not found </p>
 <p class="ContentText">We're sorry, but the page you have requested is not available. It could be that you typed the address in wrong, or maybe the page just no longer exists.     
  If you need help feel free to contact us. </p>
</div>
<!--#include virtual="/inc_footer.asp" -->

Open in new window

0
Comment
Question by:twentythree
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 7

Accepted Solution

by:
Valleriani earned 200 total points
ID: 22862947
Hey mate, I took a look at your full Css stylesheet.

You have two defines of #content.


#Content {
      float: right;
      width: 85%;
}

and

#Content {
      padding-left: 10px;
}

You should remove:

#Content {
      padding-left: 10px;
}

And then it will appear on the top, which you can then use       margin-top: XXpx; to adjust it to be even with the left side.

Hope this helps.
0
 
LVL 1

Expert Comment

by:Rapturer
ID: 22862952

Hi Twenty Three..
Good news...this should be an easy one to fix.
I won't bore you with a long answer...Try one or both (for cross browser stability):
 
#Content {
float: right;
width: 85%;
clear:both;
}

#LEFTNAV {
margin-top: 50px;
float: left;
width: 15%;
clear:both;
}

OR....
 
#Content {
float: right;
width: 85%;
overflow: auto;

}

#LEFTNAV {
margin-top: 50px;
float: left;
width: 15%;
overflow: auto;
}  
 
"Clear" has other possible attributes:
"Right", "Left", "None"
Overflow also has others:
et al. "Hidden", "Show"
 
This should get you going.
 
Rapture
0
 

Author Closing Comment

by:twentythree
ID: 31512529
I can't believe I did that LOL.. thanks for catching it!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
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…
In this tutorial viewers will learn how to style a decorative dropcap for the first letter in a paragraph using CSS. In CSS, create a new paragraph class by typing "p.fancy": Then, to style only the first letter of the first sentence, include the ps…

752 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