Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Advanced Polls -How to change radio buttons' edge color?
  • Posted: 09.12.2003, 15:24
     
    littlefoot
    rank:
    Softmore Softmore
    registered:
     November 2003
    Status:
    offline
    last visit:
    20.03.06
    Posts:
    54
    I know there is probably a simple answer for this, but I couldn't find anything on it using the forum Search.

    I like Advanced Polls much beter than the default, but the radio buttons apear with a white box around them in the Poll block (only block I've tried). This doesn't look to clean.

    How do I change that color to be clear so it'll fit better with my theme background?

    Thanks in advance. :D
  • Posted: 11.12.2003, 16:02
     
    littlefoot
    rank:
    Softmore Softmore
    registered:
     November 2003
    Status:
    offline
    last visit:
    20.03.06
    Posts:
    54
    Does nobody know? That can't be it. I'm sorry if it's a simpleton question.
  • Posted: 16.12.2003, 20:30
     
    rank:
    Moderator Moderator
    registered:
     March 2002
    Status:
    offline
    last visit:
    26.08.08
    Posts:
    7720
    I do - since I wrote it ;). I've been away on vacation so not been around much. What you've hit is a limitation of the pnHTML class used for the output. This issue is particularly aparent with darker themes and is not limited to my advanced polls module but any module that uses the pnHTML class.

    I'm currently in the process of re-coding the modules output to use pnRender so all output is templated. This will resolve this issue. I've no current timeframe for a release due to my vacation and the coming xmas holidays but I hope to work extensively on the code during this period.

    -Mark
  • Posted: 16.12.2003, 21:28
     
    andron
    rank:
    Registered User Registered User
    registered:
     December 2003
    Status:
    offline
    last visit:
    16.12.03
    Posts:
    1
    Littlefoot, there is an easy solution. Go to your themes/{yourCurrentTheme}/styles/style.css and update the styles corresponding with the radio buttons (.r-button, and if you want that on all your input items (buttons, text boxes, etc.) update the input tag as well. Add this attribute to those styles:
    background-color:transparent;

    So you would end up with something like this:

    input, textarea, select {
    color: #344A6B;
    font-size: 11px;
    font-family: Georgia, "Times New Roman", Times, Utopia, serif;
    border: inset #98ADCD 1px;
    background:#C6D1E3
    }
    input {
    border: outset 2px;
    }

    .inputPlain, .r-button{
    border: outset #FFFFFF 0px;
    background-color:transparent;
    }

    There is also a css2 feature that you are supposed to be able to use (but it's not supported by IE, it is supported by Opera, Mozilla, and Netscape though) can can declare:
    input[type="radio"]{
    background-color:transparent;}

    Mark, One great way to update your module would be to have a standard way to class the input elements (so we can use css1 (IE compliment)) you could do something like:

    input.radio {color:red}
    input.check {color:blue}
    <input type="radio" name="r1" value="A" class="radio" />
    <input type="check" name="c1" value="B" class="check" />

    That would allow us to start to get away from the HTML specification of design and start to move to the capabilities of CSS.

    -Lee
  • Posted: 19.12.2003, 13:07
     
    littlefoot
    rank:
    Softmore Softmore
    registered:
     November 2003
    Status:
    offline
    last visit:
    20.03.06
    Posts:
    54
    Thanks for the reply.

    Thanks for writing a great module Mark. I look forward to your future work.

    Andron, I have all my backgrounds set to transparent in style.css and I'm still getting the white border is IE. Ick
  • Posted: 23.01.2004, 22:04
     
    littlefoot
    rank:
    Softmore Softmore
    registered:
     November 2003
    Status:
    offline
    last visit:
    20.03.06
    Posts:
    54
    It's so odd. This is happening everywhere that has radio buttons, even in PNphpBB2. And, I know it's possible to have them transparent in IE because this forum has radio button on a non-white background and they are fine in IE.
  • Posted: 05.03.2004, 16:25
     
    littlefoot
    rank:
    Softmore Softmore
    registered:
     November 2003
    Status:
    offline
    last visit:
    20.03.06
    Posts:
    54
    I finally figured it out. This may be helpful to anyone having the same problem.

    In {yourtheme}/style/style.css

    The following setting was suggested above, but still didn't work for me:

    Code

    INPUT.r-button {
    background-color: transparent;


    I found that I had on line 39 of my style.css the following value set:

    Code

    INPUT {
    background-color: #000000;


    This value overrides the r-button value and causes the radio buttons to still have a box, not very pretty. Setting the INPUT background to transparent will fix this:

    Code

    INPUT {
    background-color: transparent;



    So, basicly what I'm saying is you need to set both those values to transparent for it to get rid off the ugly boxes.

    Hope this helps =). Sorry it took me so long to figure this out. I'm learning at a slow pace.

Extensions Moderation

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula