Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Style sheets: inline boxes

Posted on 1998-09-04
3
Medium Priority
?
222 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

610 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