?
Solved

Style sheets: inline boxes

Posted on 1998-09-04
3
Medium Priority
?
221 Views
Last Modified: 2010-04-09
Understanding of course, that netscape and IE have limited and varying implementations of CSS, I have the following question: I want to make a line of text which contains an inline box with a border followed by regular text. Here is my CSS code:

P {
font-size: 12pt;
line-height: 14pt;
text-align: left;
vertical-align: top;
font-family: geneva,verdana,tahoma,arial,helvetica;}

EM { color: red;
border-style: groove;
border-width: thick;
border-color: red; }

And here is my HTML code:

<P>Here is some text <em>contained within </em> a block of text</P>

What I get in netscape is three lines of text, the middle one (<em>) has the border of course. Now, how do I get these on one line and not three?
0
Comment
Question by:65471
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 200 total points
ID: 1837366
I haven't tested it but w3 specifications say that this:
display: inline;
will cause it to be displayed in-line, i.e. not as a block element.

hope it works for you!
-Josh
0
 

Author Comment

by:65471
ID: 1837367
Still does not work. Here is the code. See what it does for you.

<html>
<head>
<style type="text/css">
Em { display: inline; border-width: medium; border-style: dashed; }
</style>
</head>
<body><p>Several <em> emphasized words</em> appear here.</p>
</body>
</html>
0
 
LVL 8

Expert Comment

by:jbirk
ID: 1837368
Hmmm...  for some reason the border-width: medium; is causing it to have the line breaks and when using display: inline it really doesn't like the two together.  The inline works as expected normally but there's some interaction between the two that I don't undertsand (bug netscape?)

Well, anyway, maybe you can get someone else who knows CSS better to help.  Just reject my answer.

Good luck!
-Josh
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

801 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