#main

admin

Administrator
Staff member
how do i get the content up with out useing top:; because i dont want to chage it every time. i dont no wats worng the nav is float:left but i still dosnt clear the line break thing

<!-- m --><a class="postlink" href="http://jlz.vze.comwithout">http://jlz.vze.comwithout</a><!-- m --> seeing your imported stylesheet I can't even guess.

See this thread about breaking a page into sections:

<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=22673">http://forums.webdeveloper.com/showthre ... adid=22673</a><!-- m -->

JohnI just glanced at the site, but you could absolutely position your menu, then apply the necessary margin to your main content.If you move your #main div to just below <p class="catbg c2">This is my new site</p>, then that should move the main content up no matter what.

Absolute positioning removes elements from the normal document flow, but positions the element from the top and left relative to it's containing block.

I noticed a CSS class name that contained a space. That is not allowed in CSS because the space character is the child selector. So p.catbg c2 { ... } is interpreted by the browser as "apply these styles to any element named 'c2' that is a child of a paragraph element with classname 'catbg'."

Some rules about CSS class names and IDs:

1. Must start with an alphabetic character

2. Stay away from _ and - characters. The "-" character is a CSS2 selector to point the style rules to the element that comes right before another one. h4-p { color: red; } tells a browser to "color the text red for an h4 element where it is preceded by a p element."

I may have that mixed up a little, though. Darn dyslexia ;)

3. Only use alphanumeric characters for classnames and IDs. Future revisions of CSS could use other types of characters (punctuation, special characters, etc) for additional selectors.

And yes your CSS does validate, but the above suggestions will assure that your CSS will work in the future too.without seeing your imported stylesheet I can't even guess.

See this thread about breaking a page into sections:

<!-- m --><a class="postlink" href="http://forums.webdeveloper.com/showthread.php?s=&threadid=22673">http://forums.webdeveloper.com/showthre ... adid=22673</a><!-- m -->

JohnI cleaned it up pretty well by wrapping the left divs in a simple sidebar div and setting the body to a fixed width.

#sidebar { float: left; }
#main { float: right; }

And let width of #main be set by its content widths. Oh, I also stripped out all the table stuff and let the .news divs vertically size and separate themselves. I like that look better but YMMV.

.news {
border: solid 1px;
width:425px;
padding: 3px 3px 3px 3px;
margin-bottom: 5px;
}umm thx i dont use tables they were created cuz of the asp.net news thing
 
Top