SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: i think my syntax is has a small error - please look :)

  1. #1
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    i think my syntax is has a small error - please look :)

    My html
    Code:
    <div id="main">
    <span class="contnt"> 
     
    lalala - a bunch of stuff.. no more css tags nested in here
       
    </span>
    </div>
    My CSS
    Code:
    #main {
      position:absolute; 
      left:160px; 
      top:110px; 
      z-index:1; 
      width: 545px;
      border-right-width: thin;
      }
     
    .contnt p, div, th, td, li, dd  {
       /* more specific to override rule in improrting sheet */
      font-size: x-small;
       /* false value for WinIE4/5 */
      voice-family: "\"}\""; 
      voice-family: inherit;
       /*recover from trick */
      font-size: small;
       /*intended value for better browsers*/
      }
    when i add the border-right-width: thin; property for whatever reason my code pages lost he left:160px; and then the border thing doesn't work either...

    its probably a simple answer - please help

    thanks

  2. #2
    ¿uʍop ǝpısdn ʎɥʍ velocd's Avatar
    Join Date
    Aug 2002
    Location
    California
    Posts
    449
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    left and top, are those padding values, or margin values? Specify which.

    Either:
    Code:
    padding-left: 160px;
    Or:
    Code:
    margin-left: 160px;

  3. #3
    SitePoint Evangelist ktown's Avatar
    Join Date
    May 2001
    Location
    toronto
    Posts
    477
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks

  4. #4
    SitePoint Zealot Tygger2512's Avatar
    Join Date
    Jul 2003
    Location
    Pittsburg, KS
    Posts
    191
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In order to have a border display you need to specify a style and a color, in addition to the width. Change your code to:

    Code:
    #main {
      position:absolute; 
      left:160px; 
      top:110px; 
      z-index:1; 
      width: 545px;
      border-right: thin solid #000;
      }
    if you want a thin black border on the right hand side.

    Also, instead of using <span>, I would define your contnt class as another <div>, i.e. <div class="contnt">lalala</div>

    Andy.
    Learn the Emotional Freedom Technique at www.as-if-by-magic.com

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    SitePoint Award Recipient Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    37,749
    Mentioned
    99 Post(s)
    Tagged
    3 Thread(s)
    Hi,
    when i add the border-right-width: thin; property for whatever reason my code pages lost he left:160px; and then the border thing doesn't work either
    Sorry but I didn't quite understand the first bit ! But the border won't show until you give it a style and a colour:
    e.g.
    Code:
    border-right-width: thin;
    border-right-style: solid;
    border-right-color: #000000;
    or the shorthand version:
    Code:
    border-right: 2px solid #000;
    (Left and top are the correct properties for absolutely placed elements. I'm not quite sure what Solace D meant. (Perhaps it's just me being slow today [img]images/smilies/wink.gif[/img] )

    Also:
    <div id="main">
    <span class="contnt"> lalala - a bunch of stuff.. no more css tags nested in here </span>
    </div>
    Note that you will only be allowed to put inline content in that span (no <p> tags or block level elements etc).

    Paul

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •