IE block element "width" broken or am I just stupid? : )

N

Noozer

I've been asked to modify the output of one of our pages. (partial HTML and
CSS below)...

The page displays a number of groups of categories. In these categories
there are a number of checkboxes with descriptions to the right. Right now,
these descriptions stay on one line. We need to use some longer descriptions
and would like the description to wrap if it doesn't fit the width of our
DIV. I cannot see any way to do this. IE just makes the DIV wider to
accomodate the text.

Should IE be wrapping and it's just broken, or am I misunderstanding block
elements? Is there a way to get the wrapping to occur?

Issue 1</span>
Another issue, number 2</span>
Issue 3</span>
This is issue number 4</span>
Issue 5</span>
</div>

CSS...

..category{
clear: none;
background-color: #FFFFFF;
margin: 0;
padding: .3em;
float: left;
width: 10.5em;
}

..IssueItem {
display: block;
clear:none;
padding: 0;
margin:0;
}
 
O

Oli Filth

Noozer said:
I've been asked to modify the output of one of our pages. (partial HTML and
CSS below)...

The page displays a number of groups of categories. In these categories
there are a number of checkboxes with descriptions to the right. Right now,
these descriptions stay on one line. We need to use some longer descriptions
and would like the description to wrap if it doesn't fit the width of our
DIV. I cannot see any way to do this. IE just makes the DIV wider to
accomodate the text.

Should IE be wrapping and it's just broken, or am I misunderstanding block
elements? Is there a way to get the wrapping to occur?

That works fine in both IE and FF for me. With .category { width: 10.5em
}, no wrapping occurred in either, but as soon as I dropped the width
down to, say, 5em, wrapping occurred in both.



P.S. If you expect people to come up with solutions for your HTML, it's
courtesy on this group to post a URI to a test page rather than just
posting bits of code. To test your code, I had to open an editor, paste
in the HTML, then type in a DOCTYPE, a HEAD element, <HTML><BODY>,
</BODY></HTML>, and then copy and paste your CSS into a <STYLE
type="text/css"></STYLE> element, and then finally run the page. I only
did all this cause I'm bored and have nothing better to do. Busy people
will simply not bother helping you, so maximise your chances and post a
URI instead!
 
N

Noozer

Oli Filth said:
That works fine in both IE and FF for me. With .category { width: 10.5em
}, no wrapping occurred in either, but as soon as I dropped the width
down to, say, 5em, wrapping occurred in both.

Hrm... then what am I doing differently?...
P.S. If you expect people to come up with solutions for your HTML, it's
courtesy on this group to post a URI to a test page rather than just
posting bits of code.

Won't do you much good unless you want to come over and plug into my LAN.

Definately understand that having the actual page makes it much easier
though.
 
L

Leif K-Brooks

Noozer said:
Hrm... then what am I doing differently?...

Without actually seeing the page you're using (see, this is why
providing URIs is a good idea), I would guess that you're using a DTD
which throws IE into quirks mode, whereas the DTD that Oli Filth added
triggered standards mode.
 
J

Jukka K. Korpela

Noozer said:
Hrm... then what am I doing differently?...

A good question. You have the data needed for an answer, we don't.
Won't do you much good unless you want to come over and plug into my LAN.

Oh, that would be trivial, but we are real hackers: we _know_ how to crack
into your system, but we don't actually do that, it would be illegal.

Seriously, if you ask help in public, take some trouble to make the problem
visible to the public.
Definately understand that having the actual page makes it much easier
though.

Yet you decided to keep your problem to yourself. Your choice. HTH.
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top