SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: CSS Image align

  1. #1
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    CSS Image align

    Sorry, got a newbie-ish question.

    I have an image that I want to be in-line with a line of text, but it keeps appearing below the text, making the DIV that it is in too tall. Here's a sample:

    http://www.awil.com/footer.html

    Can anyone help me out? TIA!

  2. #2
    SitePoint Zealot tristanm's Avatar
    Join Date
    Jan 2005
    Location
    Hampshire, UK
    Posts
    115
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    div.InfoBoxFooter isn't too tall, what's causing the image to appear below the div is the float: right. This is easily fixed, but I'd like to suggest a more elegant solution if I may.

    Remove the images from the source, and style the header and footer divs with the appropriate image e.g.

    Code:
    .InfoBoxFooter { 
       background: rgb(89, 125, 159) url(images/LowerRightCurve.gif) bottom right no-repeat;}
    Doing so makes your mark-up cleaner by aiding the seperation of style from content.

    Something else worth mentioning - you aren't using the appropriate DTD in your mark-up which is causing standards compliant browsers to render in "quirks" mode, and can result in all sorts of strange behaviour as regards CSS.

    W3C DTDs

  3. #3
    SitePoint Member
    Join Date
    Feb 2005
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks Tristan, I'll try it out, and I'll check out that DTD doc. Thanks again...


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
  •