473,480 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

simple layout question

Hi,

I have the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtm11/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<title>crap</title>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1" />
<link rel="stylesheet" type="text/css" href="./inline_style.css"/>
</head>
<body>
<div class="box1">
<img src="./king.jpg" alt="box1"/>
</div>
<div class="box2">
<p>
box2 some text
</p>
<p>
some more text
</p>
</div>
</body>
</html>

and my stylesheet is:

..box1 {display: inline;
}

..box2 {display: inline;
}

..box1 img {display: inline;
width: 100px;
height: 100px;
}

Why does the "box2 some text" and "some more text" not appear next to the
image? Does <pnot inherit the inline from <div>?

Regards

Michael
Oct 16 '06 #1
4 1194
On Mon, 16 Oct 2006 10:51:08 +0800, in
comp.infosystems.www.authoring.stylesheets "Michael"
<mi*********@yahoo.comwrote:
>Why does the "box2 some text" and "some more text" not appear next to the
image? Does <pnot inherit the inline from <div>?
Have you tried {float: [left/right]}?
--
Money can't buy happiness, but it can let you rent it for a while...
Oct 16 '06 #2
"Michael" <mi*********@yahoo.comwrote:
>I have the following:
[code snipped]

Don't post code to the group, upload it, post the url.

--
Spartanicus
Oct 16 '06 #3
On 2006-10-16, Michael <mi*********@yahoo.comwrote:
[snip]
Why does the "box2 some text" and "some more text" not appear next to the
image? Does <pnot inherit the inline from <div>?
It doesn't.

If you add

p {display: inherit;}

or

p {display: inline;}

then the <p>s are inline.

If you look at the "Full Property Table" in Appendix F in the back of
CSS 2.1 it tells you which properties are inherited.
Oct 16 '06 #4

"Ben C" <sp******@spam.eggswrote in message
news:sl*********************@bowser.marioworld...
On 2006-10-16, Michael <mi*********@yahoo.comwrote:
[snip]
>Why does the "box2 some text" and "some more text" not appear next to the
image? Does <pnot inherit the inline from <div>?

It doesn't.

If you add

p {display: inherit;}

or

p {display: inline;}

then the <p>s are inline.

If you look at the "Full Property Table" in Appendix F in the back of
CSS 2.1 it tells you which properties are inherited.
Thanks :-)
Oct 16 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3579
by: Ken Fine | last post by:
I've made a content managment system that uses icons to represent page layouts. To choose a different layout, the user clicks on a radio button associated with each layout icon. On click of one of...
25
1104
by: Bob | last post by:
Hi Folks, I am new to CSS and have a very basic question. I am trying create a list of companies consisting of several one-liners in the form of : company name, address, phone, description,...
6
1959
by: Pete | last post by:
Hello everybody -- Forgive my multi-posting my question. I posted first to ciwah, but I learned that ciwas is the better group for this CSS question. The problem has me stopped. The page: ...
18
2159
by: Alan Little | last post by:
Viewed in IE, this page is exactly what I'm trying to do: http://www.holotech.net/links/ Header, two fixed-width columns, and a footer. However, in NS and Opera, the second column slides to...
10
1696
by: S | last post by:
Hello I have a (fairly) simple layout, part of which you folks so kindly helped me with already (thank you all). This layout contains: - A header area (100% width across top) - A nav area...
6
3736
by: KevinD | last post by:
assumption: I am new to C and old to COBOL I have been reading a lot (self teaching) but something is not sinking in with respect to reading a simple file - one record at a time. Using C, I am...
6
1488
by: alexrussell101 | last post by:
For anyone who can't be bothered to read my code and examples, scroll to the bottom, the question's there. Thanks. I'm using php and regular expressions to convert bbcode style things to html....
3
1039
by: Daniel | last post by:
Hey guys, I last made a site using Asp.net in vis studio 2003. Now in 2005 and .net 2 i want to make anothe rbut i cant get the layour working. Before i used to make eveyrhting position...
3
1883
by: Rangy | last post by:
Hi, I've decided to take the plunge and move from tables to a pure css layout. I still "think" in tables when I do my layouts and I was wondering the following: I have a simple, standard two...
1
8877
Death Slaught
by: Death Slaught | last post by:
I will be showing you how to make a very simple but effective three column layout. First we will begin with the HTML, or structure, of our three column layout. <!DOCTYPE html PUBLIC...
0
6920
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7059
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6758
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7010
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5362
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4499
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
572
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
203
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.