Rounded Corners for Fixed Width Box

Discussion in 'CSS' started by dcristo, Mar 21, 2009.

  1. #1
    Most of the coding solutions which I have found online don't work properly.

    Does anyone know of a simple CSS solution which will work in all browsers and doesn't use Javascript?

    I don't care how many images it uses, as long as it works.

    I got this to work...

    http://www.nuff-respec.com/technology/rounded-corners-for-fixed-width-css-only

    But I don't want to use a blockquote because the box is located in the sidebar and it messes it up.
     
    dcristo, Mar 21, 2009 IP
  2. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #2
    you could write a CSS rule specifically for the sidebar to remove the behaviour you don't want. Or you could change the blockquote to a DIV and if needed, apply styles until it exhibits the behaviour you desire. Utter desperation, take the rounded image (fixed width like those) apply it to an Outer DIV, while an Inner DIV holds the content. (pad it so stays off the outer rounder corners). The method from the site, like the attitude of simplicity but I believe that method would limit content. but who cares. one of those should work for you though
     
    shallowink, Mar 21, 2009 IP
  3. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,200
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #3
    I changed the blockquote to a DIV which didn't work.

    Writing a CSS rule for the sidebar sounds interesting. Can you explain further?

    I have a fixed width specified for the sidebar (using tables) but the blockquote stretches the sidebar width making it look really ugly.
     
    dcristo, Mar 21, 2009 IP
  4. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #4
    can try this :
    put it at the end of the style.css for the theme.

    #sidebar blockquote { width: 190px ; }

    course if its a table based layout, it could get interesting. it might be your placement if they are heavily nested. Try that, let see what happens.
     
    shallowink, Mar 21, 2009 IP
  5. dcristo

    dcristo Illustrious Member

    Messages:
    19,776
    Likes Received:
    1,200
    Best Answers:
    7
    Trophy Points:
    470
    Articles:
    7
    #5
    It's a table based layout. So would I wrap a DIV around the blockquotes?
     
    dcristo, Mar 21, 2009 IP
  6. shallowink

    shallowink Well-Known Member

    Messages:
    1,218
    Likes Received:
    64
    Best Answers:
    2
    Trophy Points:
    150
    #6
    shouldn't be necessary. the blockquote's a block, er, shouldn't be any possible reason another blockquote would be in the sidebar? only reason to take a further step would be to increase specificity of the blockquote. would use an id if its singular, class if its multi. we don't have to do that.
    just try it, it wont break anything that can't be fixed.
     
    shallowink, Mar 21, 2009 IP