Make a "non-container" HTML element perform like a DIV?

Is it possible to make a "non container" HTML element... ie.. <b>,<i>, etc... to act like a "container" element.. ie.. <div> via CSS?

If your answer is "Why would you wanna do that... that's dumb."... please don't reply.

I have a situation where my production menu is working in every browser except IE 8 ... it's barfing because I have "container" elements (divs) nested in an unordered list... and IE 8 is not rendering the menu and the subsequent HTML.

If your answer is "Take it out of the unordered list... duh."... I've considered this... but, if I can force a "non-container" element to behave like a "container" element (div)... it will be a much quicker fix.

Thanks for your time in advance.

My first attempt is with a bold tag... but it doesn't seem to want to align... nor does it add a <br /> before or after the <b></b>.

 b
{
  font-weight:normal;
  display:block;
}

Open in new window

LVL 3
rocketTendonAsked:
Who is Participating?
 
rocketTendonConnect With a Mentor Author Commented:
I changed it back to DIVS before I posted my link.

I found this:
http://answers.microsoft.com/en-us/ie/forum/ie8-windows_other/html-parsing-error-unable-to-modify-the-parent/e64759e0-d344-42d6-b1d8-0ce27504dd71

I supposed what I'm seeing on these 2 boxes here at work are a byproduct of... "damaged or incompatible Internet Explorer settings or add-ons,".

I can't replicate the issue on any other IE 8 box (at home or on crossbrowser).

I guess I'll try their fix... if it resolves the issue... I guess I'll just mark-it-up as a defective client and ignore.

We've been live for a week now... and I haven't had any calls or emails from IE 8 users complaining about this issue.
0
 
gavsmithCommented:
How does this look?

 b
{
  font-weight:normal;
  width:100%;
  display:inline-block;
}

Can you post any code samples of your menu? or screenshots?
0
 
rocketTendonAuthor Commented:
It's actually a series of divs with defined widths that float in columns... so I can't use font-width:100%.

IP link to my dev box (ignore the unlicensed software stuff... it's a dev box):

http://70.164.65.41/zeiss-fitted-soft-case-65mm-45-degree-angled-diascope-spotting-scopes_p19604.aspx.
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
rocketTendonAuthor Commented:
It's so weird... I'm using http://crossbrowsertesting.com (using IE 8) to test the same IP I just posted... and it renders fine in their IE 8 session... but I have 3 boxes in the office that have IE 8... and they're all missing content (product info)...

IE 8 (on these boxes at work) throws an error: "HTML Parsing Error: Unable to modify the parent container element before the child element is closed".

If I remove the menu... the IE 8 boxes here at work render the content just fine... so it HAS to be the menu.... right?
0
 
gavsmithCommented:
Which part of the page are you refering to? There doesn't seem to be many <b> tags in the page above, I'm not sure if I'm missing some parts though as I'm getting javascript errors:

Missing ) in toggle.js & 'FB' undefined in shareinternal.js

I'm using IE8 and from what I can see it looks ok, unless I put it into compatibility mode then the bottom of the page ('Full Description', 'Tech Details', etc) floats over the bottom links.

P.S. going back to your previous post, its width:100% (100% of the container) not font-width (which I don't think exists).
If the element uses 100% of the parent container that's what causes the <br/> you refered to.
0
 
gavsmithCommented:
I can see the menu you are refering to now but only in the code... I think the javascript errors are stopping it from showing at all on my browser.
0
 
rocketTendonAuthor Commented:
Does it at least show the root level navigation?
0
 
gavsmithCommented:
Oh yes, I can see Telescopes, Eyepieces & Barlows etc but all I can do is click on those links to goto the appropriate page.
0
 
rocketTendonAuthor Commented:
I found the solution on Microsoft's website.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.