Stripe Ad CSS Tutorial

Discussion in 'CSS' started by ai3gtmc, Jul 21, 2008.

  1. #1
    HI DP I just want to share stripe ad made with CSS

    here's a live demo:
    http://aboutcoolness.com/ad.html

    here's the code:

    
    <div style="
    background-color:#FFFFCC;
    border-bottom: 1px solid #FC0;
    margin: 0 0 5px 0;
    padding: 4px 0;
    font-size: 15px;">
     <center> <b><a href="http://aboutcoolness.com" target="_blank">About Coolness</a></b></center></div>
    
    
    
    
    
    Code (markup):
    change the link and text. :D
     
    ai3gtmc, Jul 21, 2008 IP
  2. steelfrog

    steelfrog Peon

    Messages:
    537
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    0
    #2
    While this works, it could have been done better, with less markup by simply modifying the anchor tag rather than wrapping it in a div.

    Just set the anchor to a block, and set the bold/center in the definition. :p
     
    steelfrog, Jul 21, 2008 IP
  3. glorie

    glorie Peon

    Messages:
    123
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I would have to agree with steelfrog. This code could have been a LOT better. And it could be done by just styling the anchor tag as what steelfrog has mentioned.

    Also the center element has been deprecated and I would recommend using strong rather than <b> or just style it using css.
     
    glorie, Jul 24, 2008 IP