Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Size problem in Safari 3

Status
Not open for further replies.

EwS

Programmer
Dec 30, 2002
398
US
When I render my application in Safari, my <input type="text"....> is wider than in other browsers. I want the box to have the same size in all browsers, such as the boxes on Dell's web site. I didn't notice anything special in their source code - how do you do this? Thank you!
 
one way would be to set the width in pixels. The problem is, unless you want buttons, radiobuttons, checkboxes, and textboxes to all have the same width, you'll need to use a classname:

Code:
<style type="text/css">
input.tb {
    width: 150px;
}
</style>

<input type="text" class="tb" name="tb1" />

There is such thing as a selector, but it only works in ie. I think it looks like this:

Code:
input[type=text] {
    width: 150px;
}

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
:)

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
I have one more question: Is it possible to include mutiple classes such as class="class1,class2" given class1 provides size and class2 text appearance. I don't think so, but I want to be sure. Thanks again.
 
only one class name per element.

Code:
.yellowTextBox {
    background-color: yellow;
    width: 150px;
}

.yellowButton {
    background-color: yellow;
    width: 30px;
}

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
only one class name per element
Wrong. You can have apply classes, just seperate them with a space:
Code:
<html>
<head>
<style>
.big { font-size: 200% }
.red { color: red }
</style>
<body>
<p class="big red">The Big Red Bus</p>
</body>
</html>
There is such thing as a selector, but it only works in ie.
Also wrong. Attribute selectors are a CSS2 thing. They don't work in IE, but will work in gecko-based browsers. You're right about using a class instead though.


-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
Nice, thanks :)

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Actually, have a star on me :)

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top