button style

liunx

Guest
hello

how can i create a new button with a certain background, text and no border?

i need a bordless textfield as well..

TNX!use this css

.buttons{
border:0px none;
background:green;
}
.inputtext{
border:0px none;
}

and this html

<button class="buttons">text</button>
<input type="text" class="inputtext" />You might want white text, instead of the default (usually black) text, if the background is green. Just a thought. :)You can also use input[type="text"] instead of inputtext, and then you get to leave out the class.note that that is a CSS 3 selector, thus won't work in IEActually it's only a CSS 2 attribute selector (<!-- m --><a class="postlink" href="http://www.w3.org/TR/REC-CSS2/selector.html#attribute-selectors">http://www.w3.org/TR/REC-CSS2/selector. ... -selectors</a><!-- m -->). ;)
However, IE still doesn't recognize it. :rolleyes:My mistakeAh. My mistake. I didn't test it in IE soo... I din't know. Sorry...Originally posted by samij586
use this css

.buttons{
border:0px none;
background:green;
}
.inputtext{
border:0px none;
}

and this html

<button class="buttons">text</button>
<input type="text" class="inputtext" />


First of all THANKS!
but i dont seem to understand, this will work on IE or not?Originally posted by adi_n
First of all THANKS!
but i dont seem to understand, this will work on IE or not?
Yes, it will work in IE.i need more assitance :D

look on the left

<!-- m --><a class="postlink" href="http://www.g-spot.co.il/index2.html">http://www.g-spot.co.il/index2.html</a><!-- m -->

the "btn" text should be bold, and the text-area should have a 2px #97B4C1 border (same size with the button)


.buttons{
border:1px none;
background:#97B4C1;
color:#F4F4F4;
}
.inputtext{
border:2px #97B4C1;
background:#F4F4F4;
}



<input type="submit" value="btn" class="buttons" > <input type="text"

class="inputtext">.buttons{
border:1px none;
background:#97B4C1;
color:#F4F4F4;
font-weight:bold;
}
.inputtext{
border:2px solid #97B4C1;
background:#F4F4F4;
}

the problems: border's won't show up unless they have a type defined (solid, dashed, etc.) and you had nothing in your styles telling the button text to be boldPerfect! thenks for your fast reply.

last question, how can i change the buttons font face and font size , and, as well, how can i limit the text width and button width?Use the properties mentioned, and use the MAXLENGTH attribute in the text INPUT.


.buttons {
font-family: arial, sans-serif;
font-size: small;
width: 70%;
}thanks dude!Piece of CSS (Cake - super style :D).Was the super style neccesarry?of course it was... otherwise it would just be a piece of C (incase you just mised the joke: Cake - Super Style)Apparently, I did miss the joke. Super cake. Nice.LOL! ;)
 
Back
Top