0

Wondering if anyone has a work around for this issue.

I've got a markup like this:

<div id="outer">
<div id="inner">
content here
</div>
</div>

now my inner div isnt always extending as far as I would like it.

alt text

Overflow: hidden; works wonders, but in this case I have some elements that overlap the edge so I cant use that. Float:left; is good but I dont want to specify a width every time.

Ideally I want it to look like this:

alt text

1
  • could you just use left: 0px in your CSS? Commented Aug 3, 2010 at 1:53

1 Answer 1

2

If you're referring to clearing floats, since you seem to lack CSS in the example then you'd just use a clearfix:

#outer:after {
    content:"";
    clear:both;
    display:block;
}

#outer { zoom:1; }

If not, please include the full HTML/CSS in a jsfiddle or link to the real thing.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.