SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict seanmayhew's Avatar
    Join Date
    Aug 2002
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Aligning Left and right same line

    Im trying to get the tagline at the top of this page http://www.news-journalonline.com/te.../css/index.htm The Independent Voice of Volusia and Flager Counties to align to the right. So I created a "date" class that sets the font color and the alignment from the top etc. But I want the tagline to inherit all of the font properties and just change the left distance to move it to the right

    Code:
     .date {
      position: absolute;
      left:10px;
      top:93px;
      width:765px;
      height:20px;
      background:#000066;
      font-size:10px;
      font-weight: bold;
      font-family: sans-serif;
      color:#ffffff;
      }
      date.tagline{
      position: absolute;
      left: 440px;
      top: 93px;
      }
    Does this make sense? I also tried doing this as an "#" id tag and was unable to get it to work.

  2. #2
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
    .date, .tagline {
    position: absolute;
    left: 10px;
    top: 93px;
    width: 765px;
    height: 20px;
    background: #006;
    font-size: 10px;
    font-weight: bold;
    font-family: sans-serif;
    color:#ffffff;
    }
    
    .tagline {
    left: 600px /* or whatever new value */
    }
    The left attribute in the first block is simply overridden by the left attribute in the later block.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  3. #3
    SitePoint Zealot Skibum1321's Avatar
    Join Date
    Jun 2003
    Location
    Malden, MA
    Posts
    142
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not really sure if I understand what you're trying to ask, but try
    font:inherit;
    if you are trying to get the class to inherit the font properties from the parent.
    Keith Rousseau

  4. #4
    SitePoint Wizard Bill Posters's Avatar
    Join Date
    Dec 2001
    Location
    UK
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I get the impression that .date and .tagline are not parent and child, but siblings (structurally speaking).

    If this is the case then one cannot inherit from the other as inheritance can only be passed from a parent element to its child element(s).

    Talk of inheritance is a complete red herring.
    New Plastic Arts: Visual Communication | DesignateOnline

    Mate went to NY and all he got me was this lousy signature

  5. #5
    SitePoint Addict seanmayhew's Avatar
    Join Date
    Aug 2002
    Posts
    209
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I ended up using the "Splitting the Difference" section of this tutorial on A List Apart:
    http://www.alistapart.com/stories/practicalcss/

    However when I attempt to apply the same code to the header section that includes the logo and the banner in IE it forces the banner underneath the logo but aligned to the right. As can be seen here
    http://www.news-journalonline.com/te.../css/index.htm

    The logo section itself is a table. And I think that is probably the problem because If I remove it and just place some text the alignment is fine. Would this have something to do with block elements?
    Last edited by seanmayhew; Jul 7, 2003 at 12:08.


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
  •