5 replies [Last post]
violetsforfurs
Offline
newbie
Oz
Last seen: 16 years 10 weeks ago
Oz
Joined: 2004-08-16
Posts: 3
Points: 0

Could someone please tell me if it is possible to remove the border around a checkbox but still have it around the text field? Please see image for an example...

The border is driving me insane and I'm becoming too obsessed about it. However, I would still like a border around the text.

Any advice would be greatly appreciated.

Thank you.

The Finch
Offline
Enthusiast
Cincinnati
Last seen: 16 years 12 weeks ago
Cincinnati
Timezone: GMT-5
Joined: 2004-08-01
Posts: 65
Points: 0

Removing a border from a checkbox..

Try defining a class for the text

e.g.

css
input.text {
border:1px solid #000;
}

html
<input class="text" type="text" /><label>text</labe>

obsidian
Offline
Enthusiast
South Carolina
Last seen: 14 years 1 week ago
South Carolina
Joined: 2004-08-15
Posts: 136
Points: 0

Removing a border from a checkbox..

I've found that if you want a specific change like you seem to want, inline styles come in very handy... declare your style in your html field that you don't want the border:

<input type="checkbox" style="border: 0;" />

Works for me!

You can't win, you can't lose, you can't break even. You can't even get out of the game!

violetsforfurs
Offline
newbie
Oz
Last seen: 16 years 10 weeks ago
Oz
Joined: 2004-08-16
Posts: 3
Points: 0

Removing a border from a checkbox..

Oh, that makes sense. Although it seems a little daunting as I'm trying to customise the style for a Phorum board. So does that mean I would have to go through all the pages and find where every checkbox is if I were to do that?

This is what I have at the moment:

Sorry, I'm completely new at all this :?

thepineapplehead
thepineapplehead's picture
Offline
Guru
Last seen: 31 weeks 3 days ago
Joined: 2004-06-30
Posts: 9668
Points: 801

Removing a border from a checkbox..

The problem with that CSS is it is affecting every instance of input. Since a textbox and a checkbox/radio button are both input types, the only way to change one but not the other is to use classes, or inloine styles, as has been mentioned above.

Verschwindende wrote:
  • CSS doesn't make pies

violetsforfurs
Offline
newbie
Oz
Last seen: 16 years 10 weeks ago
Oz
Joined: 2004-08-16
Posts: 3
Points: 0

Removing a border from a checkbox..

Ahhh okay.. I get it now.

Thanks everyone for your replies Laughing out loud