|
|
|
Joined: Jun 2002
Posts: 121
Member
|
Member
Joined: Jun 2002
Posts: 121 |
This is mainly intended for use on my Ubb although the knowledge could be very useful.
I understand using CSS that I can change the colour's of form element's such as radio box's and button's. Currently I am testing the CSS to get the right look within my form's but I have a problem. I am using the below code to colour in my forum button's: _________________________
INPUT { background:rgb(255,0,255); color:rgb(0,0,0); border-style:solid; border-color:rgb(0,0,0); border-width:2px; } _________________________
If you ignore the colour's you will see that it does infact change the colours of the button's but it also changes the radio button's colour etc too which I dont want.
What code would I have to use within my CSS so that it only effect's the button's on my Ubb such as "Add reply" "Add New Topic" "Spell Check" "Add Reply" etc.
I Cannot Support Ubb Via ICQ or MSN. Not because I dont want to its just I cant.
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
If you look at the CSS and also at the HTML, you'll realize why things happen as they do. The code you posted says to take all INPUT elements and style them with the given properties. OK, good.
However, the INPUT element includes many different form controls, so you have to be careful in how you use it. We're talking about text fields, password fields, checkboxes, radio buttons, submit buttons, reset buttons, and even a couple of other kinds of buttons. To be blunt, there's no easy way around this to do what you're trying to do.
You'll have to make a class and then edit the templates manually, applying to class only to the elements that you want styled. Hope this gets you started in the right direction.
|
|
|
|
Joined: Jun 2002
Posts: 121
Member
|
Member
Joined: Jun 2002
Posts: 121 |
Yeah I read about the modifying part. What files contain the templates for the posting sheets ie the ones with the buttons and how do I make a class for them?
So Id open up the file find the forum buttons and add something in like class="blag"
And in my css rather than put input Id type blag?
Am I in the right direction.
I Cannot Support Ubb Via ICQ or MSN. Not because I dont want to its just I cant.
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
It's been awhile since I've edited the files, but I believe that you'll need to open up /nonCGI/Templates/public_new_topic_form.pl, public_new_reply_form.pl, and public_edit_post.pl. Here's an example of your code made into a class and condensed. I can see you've got some reading to do. [code][/code]
|
|
|
|
Joined: Jun 2002
Posts: 121
Member
|
Member
Joined: Jun 2002
Posts: 121 |
Ok I think Ive got it:
[code][/code]And added the class type above!
Is this what Id have to add to every single form which has a button in?
And after that I just add to my css class=button rather than strictly input?
Hope Im in the right area.
I Cannot Support Ubb Via ICQ or MSN. Not because I dont want to its just I cant.
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
|
|
|
|
Joined: Jun 2002
Posts: 121
Member
|
Member
Joined: Jun 2002
Posts: 121 |
Yeah I know thats what I was getting at butthanx man. 
I Cannot Support Ubb Via ICQ or MSN. Not because I dont want to its just I cant.
|
|
|
|
Joined: Sep 2000
Posts: 4,211
Master Hacker
|
Master Hacker
Joined: Sep 2000
Posts: 4,211 |
quote: Originally posted by jeologic: input & select & textarea are pre-declared classes in css.
They're elements, not classes.
|
|
|
|
Joined: May 2000
Posts: 1,356
Addict
|
Addict
Joined: May 2000
Posts: 1,356 |
yes, they are elements... sorry...
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 449
Joined: February 2008
|
|
Forums63
Topics37,575
Posts293,930
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|
|
|