SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Guru Zygoma's Avatar
    Join Date
    May 2006
    Location
    York, Uk
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple column black border prroves elusive :-(



    Hi.. On this page:
    http://www.pauserefreshment.co.uk/3_..._tutorial.html
    I just wanted to add a black border to the central column as the screen shot illustrates so I added this:

    #columnmain3 {
    width:267px;
    float:left;
    background:yellow;
    border:#000000 thick;
    }

    But no go :-(

    So if anyone out in sitepoint land could show me the way...
    I have had a perfectly wonderful
    evening, but this wasn't it-
    Julius "GROUCHO" Marx - 1890-1977
    http://www.davidclick.com

  2. #2
    SitePoint Evangelist
    Join Date
    Apr 2009
    Location
    South Carolina
    Posts
    458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This may have nothing to do with your problem, but you have code like this:
    <p>TEST column right.
    </div>
    </div>
    </div>
    </div>
    </p>

    Try moving that closing </p> to the correct location and see if things start working.
    Each day is a learning experience.

  3. #3
    SitePoint Guru Zygoma's Avatar
    Join Date
    May 2006
    Location
    York, Uk
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CSU-Bill View Post
    This may have nothing to do with your problem, but you have code like this:
    <p>TEST column right.
    </div>
    </div>
    </div>
    </div>
    </p>

    Try moving that closing </p> to the correct location and see if things start working.
    Thanks Bill for spotting a code error which Ive now fixed but still a simple black border around the central yellow column prooves elusive :-(

    I have had a perfectly wonderful
    evening, but this wasn't it-
    Julius "GROUCHO" Marx - 1890-1977
    http://www.davidclick.com

  4. #4
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,509
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    border:thick none #000000;


  5. #5
    reputation consultant ThaVincy's Avatar
    Join Date
    Mar 2003
    Location
    Flanders
    Posts
    523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    tried border: 2px solid #000000; ?
    ThaVincy | redesigning your image
    Twizted Imagebuilding personal and corporate reputation solutions

  6. #6
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,549
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Note also that the keyword "thick" will give different results in different browsers so use pixels instead ("none" should be "solid" in case you were wondering )

  7. #7
    SitePoint Guru Zygoma's Avatar
    Join Date
    May 2006
    Location
    York, Uk
    Posts
    916
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ThaVincy View Post
    tried border: 2px solid #000000; ?
    Hallelujah!!! That worked thank you :-)
    I have had a perfectly wonderful
    evening, but this wasn't it-
    Julius "GROUCHO" Marx - 1890-1977
    http://www.davidclick.com

  8. #8
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,892
    Mentioned
    123 Post(s)
    Tagged
    1 Thread(s)
    This has always struck me as a flaw in CSS - why can't a border be assumed to be solid unless otherwise stated, given that that is what people usually want, and expect.

  9. #9
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,549
    Mentioned
    183 Post(s)
    Tagged
    6 Thread(s)
    Quote Originally Posted by Stevie D View Post
    This has always struck me as a flaw in CSS - why can't a border be assumed to be solid unless otherwise stated, given that that is what people usually want, and expect.
    I know what you mean (and I half agree) but we don't really want browsers to second guess what we meant do we .

    Most people forget that border is "shorthand" for all the properties and the default for "border-style" is none (border-style is also a shorthand of course). It's the same for most shorthand properties and omitted values will quite often default to none (like background-image).

    I suppose it could default to solid but that may be just as confusing because borders can also be dotted , dashed or one of the other styles so with omitted values the logical answer would be don't style them unless specifically told to do so.

    After all we've finally stopped browers make best guesses for use when we use strict doctypes (e.g. if you omit the units from dimensions you get zero). We don't really want browsers second guessing us again as we went through all that last century and it was a nightmare. Just let them do what we explicitly tell them


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
  •