473,513 Members | 2,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Floating Problem

150 New Member
I'm having problem with this css why i don't know

That is my HTML:
[HTML]<div id="main_container">
<div id="menu">
<div id="menu_Categories">
<img src="../IMGS/LIST_O_00.gif" width="13" height="14" align="top" border="0"/> Smartic Categories
</div>
<div id="Sub_Categories">
<a href="#"><img src="../IMGS/LIST_O_01.gif" width="13" height="13" align="top" border="0"/> Real Estate</a>
<a href="#"><img src="../IMGS/LIST_O_01.gif" width="13" height="13" align="top" border="0"/> Video Games</a>
</div>
</div>
<div id="container_body">Welcome visitors</div>
</div>[/HTML]

That is my CSS:

Expand|Select|Wrap|Line Numbers
  1. #main_container {
  2.     color: #666666;
  3.     padding-top: 50px;
  4.     padding-right: 10px;
  5.     padding-bottom: 10px;
  6.     padding-left: 10px;
  7.     border: 1px solid #CCCCCC;
  8. }
  9. #menu {
  10.     width: 200px;
  11.     float: left;
  12. }
  13. #menu_Categories {
  14.     background-color: #9bcdff;
  15.     color: #FFFFFF;
  16.     padding: 5px;
  17. }
  18. #Sub_Categories {
  19.     border-right-width: 1px;
  20.     border-bottom-width: 1px;
  21.     border-left-width: 1px;
  22.     border-top-style: none;
  23.     border-right-style: solid;
  24.     border-bottom-style: solid;
  25.     border-left-style: solid;
  26.     border-right-color: #CCCCCC;
  27.     border-bottom-color: #CCCCCC;
  28.     border-left-color: #CCCCCC;
  29.     padding: 5px;
  30. }
  31.  
  32. #Sub_Categories a {
  33.     color: #999999;
  34.     font-size: 11px;
  35.     display: block;
  36.     padding: 3px;
  37. }
  38. #Sub_Categories a:hover {
  39.     color: #FF3300;
  40.     background-color: #E2EFFE;
  41.     border: 1px solid #666666;
  42.     padding: 2px;
  43. }
  44. #container_body {
  45.     margin-left: 220px;
  46. }
Sep 15 '07 #1
3 1313
ronverdonk
4,258 Recognized Expert Specialist
So you showed the code. What is the problem you encounter?

Ronald
Sep 15 '07 #2
smartic
150 New Member
Smartic Categories should be within the border of the page but it dosen't do that it gets out of the border of the page
Sep 15 '07 #3
drhowarddrfine
7,435 Recognized Expert Expert
Elements are not to expand to contain floated elements. But to do what you want, add 'overflow:auto' to #main_container.
Sep 16 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

14
2598
by: Amit Bhatia | last post by:
Hi there. I am cross posting this on comp.lang.c as well: sorry for same. The problem I am facing is as follows: For example: double a= 0.15; double b=2.4; const double VERYTINY =1.e-10; I...
5
3727
by: Anton Noll | last post by:
We are using Visual Studio 2003.NET (C++) for the development of our software in the fields digital signal processing and numerical acoustics. One of our programs was working correctly if we are...
12
2797
by: meltedown | last post by:
I would like the floating divs to float and then the header to come after them , on the left. That's what I thought clearing the floats was for, but in this example, the header is to the right of...
10
2239
by: Shawn | last post by:
Hello all, I apologize as I am sure this has probably been dealth with before... but I am doing an exercise from "Practical C Programming" and I have been unable to get it to work perfectly due to...
7
2565
by: Daniel Vallstrom | last post by:
I am having trouble with floating point addition because of the limited accuracy of floating types. Consider e.g. x0 += f(n) where x0 and f are of some floating type. Sometimes x0 is much larger...
15
3899
by: michael.mcgarry | last post by:
Hi, I have a question about floating point precision in C. What is the minimum distinguishable difference between 2 floating point numbers? Does this differ for various computers? Is this...
13
4099
by: Bern McCarty | last post by:
I have run an experiment to try to learn some things about floating point performance in managed C++. I am using Visual Studio 2003. I was hoping to get a feel for whether or not it would make...
32
4049
by: ma740988 | last post by:
template <class T> inline bool isEqual( const T& a, const T& b, const T epsilon = std::numeric_limits<T>::epsilon() ) { const T diff = a - b; return ( diff <= epsilon ) && ( diff >= -epsilon );...
39
3520
by: rembremading | last post by:
Hi all! The following piece of code has (for me) completely unexpected behaviour. (I compile it with gcc-Version 4.0.3) Something goes wrong with the integer to float conversion. Maybe somebody...
6
2502
by: Jeremy | last post by:
I've got a floating div which becomes visible when a link is clicked. I want the div to be hidden when the user clicks anywhere on the page except for whithin the div. What is the best way to do...
0
7161
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7539
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7101
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7525
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5686
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
3222
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1596
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
456
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.