Web Analytics Made Easy -
StatCounter css div problems..... - CodingForum

Announcement

Collapse
No announcement yet.

css div problems.....

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • css div problems.....

    how would i make my divs to where when it expands it fills with a solid color?
    like this,
    <div id="container">
    <div id="expady thing">
    <div id="content">
    blah blah blah blah blah
    blah blah
    </div>
    </div>
    </div>

    +----------------------------+
    content content content------
    content content content------
    content content content------
    content content content------
    content content content------
    content content content------

    +----------------------------+

    here is what i am trying to do:
    http://flashanims.com/undcon/flashanims.php

    do you see how the color is uneven at the bottom?
    how do i just fix that? and just view>source to see the code. thanks!

  • #2
    It's simple: Set the background color of the container.

    You might want to work on your HTML. It's missing a doctype declaration and invalid. You also probably want to clear your floats as the right-side background doesn't look right outside of Internet Explorer. Resources:

    Comment


    • #3
      wow, thanks for the awesome response but it isn't that easy, i have tried that and it didn't work. it just doesn't the container centers it, and i tried another container seperate form that one. and it still doesn't work...i am completely stumped...

      oh, and when i put the doctype code in there, it made my page xhtml....so does that change the way things are displayed?
      Last edited by <?austin ?>; Oct 14, 2006, 11:31 PM.

      Comment


      • #4
        Well, I took another look and the obvious solution doesn't seem to be working due to the way the page was designed. For example, you're unnecessarily using absolute positioning and you still need to clear your floats. I also can't get a good grasp on even how the page is being presented because most of your CSS is inline. It should be within an embedded (style element) or external (*.css file) stylesheet.

        Comment


        • #5
          that is what i usually do, but this is the unfinished template for hte new site. and what do you mean by inline css? does it matter, or does it change the way it displays?

          oh, and clearing floats? and it already is inside a <style></style>element
          Last edited by <?austin ?>; Oct 14, 2006, 11:47 PM.

          Comment


          • #6
            Originally posted by <?austin ?> View Post
            and what do you mean by inline css? does it matter, or does it change the way it displays?
            Inline CSS is CSS within the HTML (using the style attribute). Example:

            <div style="property: value;"></div>

            The end result is no different than CSS input via an embedded or external stylesheet. However, it makes your code considerably more difficult to read, edit, and troubleshoot when you use inline CSS because the CSS is all over the place. It also makes the HTML more difficult to read.

            Originally posted by <?austin ?> View Post
            oh, and clearing floats?
            I already provided a resource regarding that in a previous post. You won't even see the problem unless you view your page outside of Internet Explorer. This affects the background display, so it's relevant.

            Originally posted by <?austin ?> View Post
            and it already is inside a <style></style>element
            Then what is this? <div style="position: absolute; width: 760px; top: 95px; left: 0px; background-color: #7b9abb;">

            Comment


            • #7
              oh i think i misunderstood you, i went ahead and linked the css file in there, i am still trying to take all the attributes and putting them in the file. well, so after i do this will it display correctly? lol i never knew it was that picky.

              edit: i previewed the thing in fire fox and it looks horrible....grrr i guess ima work on it tomorow...and i am ogig to revert to the new layout i am thinking of...
              Last edited by <?austin ?>; Oct 15, 2006, 12:21 AM.

              Comment

              Working...
              X