Topic: Be nice Opera5 rule (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=10964" title="Pages that link to Topic: Be nice Opera5 rule (Page 1 of 1)" rel="nofollow" >Topic: Be nice Opera5 rule <span class="small">(Page 1 of 1)</span>\

 
Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 04-30-2003 23:50

Hi, guys. How are you?
Well, you guys have heard of Be nice to Opera5 rule, haven't you?
I got a question about it. Here is my code:

quote:
.content{
width: 700px;
padding: 20px 50px 20px;

/*Here is Hack!*/
voice-family: "\"}\"";
voice-family: inherit;
width: 600px;
}
/* Be nice to Opera5 */
body>.content{width: 600px;}



In my understanding to body>.content{width: 600px;}, if class: content is child of body, the width of content will be 600px. Is that right? But if I nested content div inside of another div, called outline, is that still correct or do I have to change it like:

quote:
.outline>.content{width: 600px;}



My some of code is following:

quote:
.content{
width: 700px;
padding: 20px 50px 20px;

/*Here is Hack!*/
voice-family: "\"}\"";
voice-family: inherit;
width: 600px;
}
/* Be nice to Opera5 */
body>.content{width: 600px;}

.outline{
border: solid 5px #000;
}
-----------------------------------------
<body>

<div class="outline">

<p class="left">Well, I'd like to talk about my Meta and search engine problem.
I tried to find my web site using Google. But I couldn't. Hmm......I don't get the

answer why.... Please help.
</p>

<div class="content">
<p>Emperor&nbsp;&nbsp;&nbsp;&nbsp;04-28-2003</p>
.....................................................
</div>
</div>
</body>
<html>



I am a bit confused. Do you know what I mean?

Hiroki Kozai

HZR
Bipolar (III) Inmate

From: Cold Sweden
Insane since: Jul 2002

posted posted 05-01-2003 00:54

"body>.content" will only match .content classes that is a child of the body. So you'll have to change it to

code:
.outline>.content{width: 600px;}

as you said.



[This message has been edited by HZR (edited 05-01-2003).]

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 05-01-2003 01:20

Hi, HZA! Wonderful to hear from you!
Thanks for your reply.
Yes, that is what I thought.
And make sense to me.
Many thanks!!! \ (^^) /
Cya.

Hiroki Kozai

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 05-01-2003 03:10

A better version of the "be nice to opera" rule is this:

html>body .content {...}

Because you don't have to worry about what the parent of .content is - you know that the body is always a child of the html element, and that .content is always somewhere within the body, so this does the trick. This is more convenient since you don't need to be concerned about where .content is in the document.

Hiroki
Paranoid (IV) Inmate

From: NZ
Insane since: Dec 2002

posted posted 05-01-2003 03:14

Hi, Slime. That is fantastic!
Many thanks!
Cya.

Ps. I have just had lunch. Feel happy.

Hiroki Kozai



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu