WEB Couple newb CSS questions i just can't F*ing get.

Discussion in 'OT Technology' started by brds, Jul 2, 2008.

  1. brds

    brds OT Supporter

    Joined:
    Jun 26, 2006
    Messages:
    17,642
    Likes Received:
    13
    Location:
    Atlanta
    Have 2 questions....
    1) WTF is the command to make an empty div display even if there's no text. The following is the style i set to the div. It's going to be used as a shadow, and i just want it to appear empty and use the shadow as the bg image.
    Code:
    position:absolute; 
    top:15px; 
    width:5px; 
    float:right; 
    right:-5px; 
    display:inline; 
    background-image:url(./images/bordershadow.gif); 
    background-repeat:repeat-y;
    
    I tried using display: inline and display:block... but neither worked.


    My second question is:
    2) Is there a way i can make a child div just as tall as it's parent div? For example, if i have:
    Code:
    <div style="style shit goes here">
    a 
    whole
    lotta
    text
    going
    here
         <div style="float:right.... other elements to make it align right">
              Shadow from question 1
         </div>
    </div>
    
    How can i make the child div just as tall as the parent?




    I hope that's clear... if not, please ask me to clarify.
     
  2. White Stormy

    White Stormy Take that, subspace!

    Joined:
    Sep 17, 2002
    Messages:
    85,489
    Likes Received:
    70
    Location:
    Sparkopolis
    I didn't read everything, but..

    position: absolute; will only work on the inside div if the outside div has position: relative; or position: absolute;

    so add position: relative; to the outer div and then try it..
     
  3. M3Driver

    M3Driver New Member

    Joined:
    Oct 28, 2003
    Messages:
    5,622
    Likes Received:
    0
    Location:
    Minneapolis
    why not just throw a &nbsp in the div?
     

Share This Page