Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > puzzling <div> problem

Reply
Thread Tools

puzzling <div> problem

 
 
Richard
Guest
Posts: n/a
 
      09-12-2003
<div class="parent">
<div class="child1">
<div class="child1a">
xxx
</div>
</div>
<div class="child2">
<br>hello
</div>
</div>


The problem is in "child2".
In order for "hello" to show in the first line of the div tag, I need that
damn break in there.
Otherwise it doesn't show at all.
If I insert an image, the top line is cut off regardless of height.
I've tried various combinations in the definitions but can't figure this
thing out.

http://1-large-world.com/div1.html



 
Reply With Quote
 
 
 
 
Richard
Guest
Posts: n/a
 
      09-12-2003
Never mind. Worked it out.
Found out I forgot to include a } in the proper place.
Oh well.



 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      09-12-2003
Richard wrote:

> <div class="parent">
> <div class="child1">
> <div class="child1a">
> xxx
> </div>
> </div>
> <div class="child2">
> <br>hello
> </div>
> </div>
>
>
> The problem is in "child2".
> In order for "hello" to show in the first line of the div tag, I need that
> damn break in there.
> Otherwise it doesn't show at all.
> If I insert an image, the top line is cut off regardless of height.
> I've tried various combinations in the definitions but can't figure this
> thing out.
>
> http://1-large-world.com/div1.html


Maybe you noticed, that the height of child2, is only 3
times as high as the height of child1, but you specified it
as 4 times as high. (child1: 25px, child2:100px) This is
because child1 is positioned in front of child2. This
explains the 'hello' being invisible; it is behind child1.
Just change the style for div.child1 {position:absolute;} to
{position:relative}, and it will appear as intended.


--
Els

Mente humana é como pára-quedas; funciona melhor aberta.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Puzzling VPN problem with Windows 2003 John Rennie Cisco 0 03-14-2006 07:19 PM
puzzling dvd burner problem Demolitio Computer Support 10 07-17-2005 06:59 AM
Puzzling Hijack (I think) Problem Steve Meyerson Computer Support 7 09-23-2004 06:27 AM
puzzling routing problem Geert Cisco 0 04-07-2004 10:28 PM
Puzzling form/cgi problem Dfenestr8 Python 2 11-03-2003 01:13 AM



Advertisments