CSS Style Help (With + Div)

N

NvrBst

I have two DIV's (floated left). The Div's width shrink-wrap to the
content inside the div. This is good and what I want.

Problem: I want a textbox inside one of the divs to be 100% of the
width of the shrink-wrapped div. If I set width=100% then inside
Chrome it looks the way I want it, however, inside IE7 it makes the
textbox width the full size of the screen (stretching the width of the
div).

Question: Is there a cross-browser way to set the textbox width to the
size of the div? Or how would I accomplish this with IE7 (Shrink-
Wrapped Div with an element being the full size of the div).

Thanks
 
N

Neredbojias

I have two DIV's (floated left). The Div's width shrink-wrap to the
content inside the div. This is good and what I want.

Problem: I want a textbox inside one of the divs to be 100% of the
width of the shrink-wrapped div. If I set width=100% then inside
Chrome it looks the way I want it, however, inside IE7 it makes the
textbox width the full size of the screen (stretching the width of
the div).

Question: Is there a cross-browser way to set the textbox width to
the size of the div? Or how would I accomplish this with IE7
(Shrink- Wrapped Div with an element being the full size of the div).

Untried, but you could see if setting the relevant floated div to
"position:relative;" helps.
 
N

NvrBst

Untried, but you could see if setting the relevant floated div to
"position:relative;" helps.

Sorry for the late reply, I have been busy with other stuff. I tried
setting the div to "position: relative;", however, it still only works
in chrome and doesn't work with IE7. Right now I just set the width
expelicity to 25em (basically how wide it should be), which works
okay, but, if someone knows the answer to a 100% width in IE7 it'd be
great. :)

NB
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,265
Messages
2,571,071
Members
48,771
Latest member
ElysaD

Latest Threads

Top