[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2012-09-12
9
Medium Priority
?
498 Views
Last Modified: 2012-09-17
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

0
Comment
Question by:rocketTendon
  • 5
  • 4
9 Comments
 
LVL 10

Expert Comment

by:gavsmith
ID: 38391261
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
 
LVL 3

Author Comment

by:rocketTendon
ID: 38391297
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
 
LVL 3

Author Comment

by:rocketTendon
ID: 38391323
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 10

Expert Comment

by:gavsmith
ID: 38391463
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
 
LVL 3

Accepted Solution

by:
rocketTendon earned 0 total points
ID: 38391493
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
 
LVL 10

Expert Comment

by:gavsmith
ID: 38391537
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
 
LVL 3

Author Comment

by:rocketTendon
ID: 38391577
Does it at least show the root level navigation?
0
 
LVL 10

Expert Comment

by:gavsmith
ID: 38391611
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
 
LVL 3

Author Closing Comment

by:rocketTendon
ID: 38404760
I found the solution on Microsoft's website.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question