Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 11-07-2009, 02:44 PM   PM User | #1
bucket
Regular Coder

 
Join Date: Sep 2008
Posts: 346
Thanks: 1
Thanked 2 Times in 1 Post
bucket is infamous around these parts
Not giving button style

I currently have this css:

Code:
input{
font-size:12px;
padding:4px 2px;
border:solid 1px #675f39;
}
</style>
and this form:

Code:
<form action="accounts-password.php" AUTOCOMPLETE = "off" method="POST"> 
<input type="hidden" name="member" value="1" /> 

<span style="float: left;">
Your old Password:
</span>
<span style="float: right;">
<input size="40" class="only" type="password" name="oldpass">
</span>
<br><br>
<hr>

<span style="float: left;">
Your New Password:
</span>
<span style="float: right;">
<input size="40" type="password" name="newpass">
</span>
<br><br>

<span style="float: left;">
Re-Type Your New Password:
</span>
<span style="float: right;">
<input size="40" type="password" name="veri">
</span>
<br><br>
<hr>
<center>
<input name="chpass" id="submit" type="submit" value="Change Password" >
</center>

</form>
I only want css style for the input textboxes like:
Code:
<input size="40" type="password" name="newpass">
For some reason Its giving me a css style for the submit button:
Code:
<input name="chpass" id="submit" type="submit" value="Change Password" >
How do I do it so the submit button stays default like with no css added to it, but the input text boxes still keep it?

I guess its because they are both starting with the '<input', not sure.
__________________
MY MSN: Sith717@Hotmail.com
PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
PM me anytime for HTML, PHP or web design help. I will be glad to help you out.
bucket is offline   Reply With Quote
Old 11-07-2009, 03:08 PM   PM User | #2
calebandchels
New to the CF scene

 
Join Date: Nov 2009
Location: Florida United States
Posts: 9
Thanks: 1
Thanked 0 Times in 0 Posts
calebandchels is an unknown quantity at this point
Give spans classes

Try giving all your inputs that you want changed a class and call the class in the CSS.

Last edited by calebandchels; 11-07-2009 at 03:08 PM.. Reason: bad spelling
calebandchels is offline   Reply With Quote
Old 11-07-2009, 03:10 PM   PM User | #3
met
Regular Coder

 
Join Date: Oct 2009
Location: United Kingdom
Posts: 229
Thanks: 2
Thanked 32 Times in 32 Posts
met is an unknown quantity at this point
as you say this is because submit starts with<input

two ways to rememdy this:

either:

Code:
input .textbox-only {
    font-size:12px;
    padding:4px 2px;
    border:solid 1px #675f39;
}

<input class="textbox-only" size="40" type="password" name="newpass" />
or

Code:
input {
    font-size:12px;
    padding:4px 2px;
    border:solid 1px #675f39;
}

input .button-no-style {
 /* another style */
}

<input class="button-no-style" name="chpass" id="submit" type="submit" value="Change Password" >
use the later if you want a different style..if you want the default buttons, use the first example (class on textboxes)
met is offline   Reply With Quote
Old 11-07-2009, 03:23 PM   PM User | #4
bucket
Regular Coder

 
Join Date: Sep 2008
Posts: 346
Thanks: 1
Thanked 2 Times in 1 Post
bucket is infamous around these parts
Its still giving me the same style as the input for the button-no-style
__________________
MY MSN: Sith717@Hotmail.com
PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
PM me anytime for HTML, PHP or web design help. I will be glad to help you out.
bucket is offline   Reply With Quote
Old 11-07-2009, 03:25 PM   PM User | #5
met
Regular Coder

 
Join Date: Oct 2009
Location: United Kingdom
Posts: 229
Thanks: 2
Thanked 32 Times in 32 Posts
met is an unknown quantity at this point
like i said, you need to either specify another style for the submit button if you want it different than the text boxes, or use the first method (class applied to text boxes only) if you don't want any styling applied to the submit

apologies for any confusion

Code:
input .style {
    font-size:12px;
    padding:4px 2px;
    border:solid 1px #675f39;
}
<input class="style" name="" type="text" /> /* styled */
<input type="submit" name="Submit" value="Submit" /> /* default */
met is offline   Reply With Quote
Old 11-07-2009, 03:42 PM   PM User | #6
bucket
Regular Coder

 
Join Date: Sep 2008
Posts: 346
Thanks: 1
Thanked 2 Times in 1 Post
bucket is infamous around these parts
Okay, well I have done it my way and it works perfect.

I got a new problem:

I want this:

Code:
<span style="float: left;">
Main News Message: 
</span>
<span style="align: right;">
<textarea style="border:solid 1px #675f39; padding:4px 2px;" name="mainnewsmessage" cols="40" rows="8">
<?php echo $row['mainnewsmessage']; ?>
</textarea>
</span>
<hr>
I want the textbox to align at the right, right now its not working and aligning right next to the 'Main News Message:' text.

It would work before:
Code:
<span style="float: left;">
Main News Message:
</span>
<span style="float: right;">
<textarea style="border:solid 1px #675f39; padding:4px 2px;" name="mainnewsmessage" cols="40" rows="5">
<?php echo $row['mainnewsmessage']; ?>
</textarea>
</span>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<hr>
But I would have to add alot of:
Code:
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<hr>
to it...
__________________
MY MSN: Sith717@Hotmail.com
PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
PM me anytime for HTML, PHP or web design help. I will be glad to help you out.

Last edited by bucket; 11-07-2009 at 03:47 PM..
bucket is offline   Reply With Quote
Old 11-07-2009, 03:51 PM   PM User | #7
abduraooft
Master Coder

 
abduraooft's Avatar
 
Join Date: Mar 2007
Location: God's own country
Posts: 8,975
Thanks: 142
Thanked 1,192 Times in 1,184 Posts
abduraooft is a jewel in the roughabduraooft is a jewel in the roughabduraooft is a jewel in the roughabduraooft is a jewel in the rough
Quote:
Originally Posted by met
Code:
input .style {
    font-size:12px;
    padding:4px 2px;
    border:solid 1px #675f39;
}
There shouldn't be any blank space before that period.
__________________
Quote:
The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)
abduraooft is offline   Reply With Quote
Old 11-07-2009, 03:52 PM   PM User | #8
bucket
Regular Coder

 
Join Date: Sep 2008
Posts: 346
Thanks: 1
Thanked 2 Times in 1 Post
bucket is infamous around these parts
so like?

Code:
input.style {
    font-size:12px;
    padding:4px 2px;
    border:solid 1px #675f39;
}
__________________
MY MSN: Sith717@Hotmail.com
PHP, HTML, and CSS Coding, Logo and Web Design - Professionally done.
PM me anytime for HTML, PHP or web design help. I will be glad to help you out.
bucket is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:43 AM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.