473,547 Members | 2,532 Online
Bytes | Software Development & Data Engineering Community
+ 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.cs s"/>
</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 1197
On Mon, 16 Oct 2006 10:51:08 +0800, in
comp.infosystem s.www.authoring.stylesheets "Michael"
<mi*********@ya hoo.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*********@ya hoo.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*********@ya hoo.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******** *************@b owser.marioworl d...
On 2006-10-16, Michael <mi*********@ya hoo.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
3594
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 the radio buttons, the form submits and a new layout is chosen. I would prefer if people can click on the icons themselves , rather than using...
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, etc. I want the text to have no margins and no space between lines, but I want the first line bold. And, I want a space between companies such as: ...
6
1961
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: http://www.key-horse.com/fftst.html is rendered completely differently by Firefox 1.0 and IE 6.0. The code
18
2167
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 the left, on top of the first column. I've read all the tutorials and examples I could find, but everything else ends up with the second column all...
10
1704
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 (left side of page, vertically) - A body area (All space to the right of the nav)
6
3756
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 trying to read a flatfile. In COBOL, my simple file layout and READ statement would look like below. Question: what is the standard, simple...
6
1495
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. My code to convert something like this: Hello there
3
1043
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 absolute and just drag and drop where i wanted things to go and this worked great cross browser, looked same on all machines i was happy. In Vis studio...
3
1885
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 column layout: header nav content
1
8882
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 "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/2002/REC-xhtml1-20020801/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"...
0
7510
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7437
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7703
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7947
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7797
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5081
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1923
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1050
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.