SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Zealot cckrocks's Avatar
    Join Date
    Nov 2000
    Location
    A home in the hills where the grass grows green an
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I read a post a while back on how to ocntrol the size of an input box with css..well now I need that information, and can't find it/didn't write it down, so could some please help. The input box is blowing apart my table. Thanks for the help.
    Think beyond what is common...
    www.jaggedknife.com
    www.fusion-in.com

  2. #2
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the 'size' and 'cols' attributes don't work? I heard you could use 'cols' to shrink the text box (although I personally haven't tried it myself).

    Post back and tell me if it works, please.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  3. #3
    SitePoint Wizard
    Join Date
    Jan 2001
    Location
    Milton Keynes, UK
    Posts
    1,011
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try using some css:

    Code:
    <style>
    .mytextbox {
      width: 150px;
      border-style: solid;
      border-color: #000000;
      border-width: 1px;
      color: #003399;
      background-color: #cccccc;
      font-size: 11px;
      font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
    }
    </style>
    You'll still need to do some testing with different browsers when using css with form elements. Even Opera 5 doesn't apply all the above css.

    You can also use the attribute 'height' but I'd only consider using this for <textarea>.

    If you leave out the border properties in the css it'll use the default broswer style. But the default border style varies between browsers. For css the default border-style is 'solid' so in theory you can leave this out but if you do some browsers won't apply any of the border style attributes.

    Shane

  4. #4
    SitePoint Zealot cckrocks's Avatar
    Join Date
    Nov 2000
    Location
    A home in the hills where the grass grows green an
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks..its the width attribute that fixes it. I still have a strange problem though...it makes one of the input boxes have a 3d border and the other one has no border. They are both defined with the same class, are in the same <td> and in the same form...go figure. I have another question for you though GOOBER check at this url..I just need to know how to insert this into the asp code I have, and you seem to be the most knowledgeable about asp. Here it is: http://www.sitepointforums.com/showt...381#post119381
    Think beyond what is common...
    www.jaggedknife.com
    www.fusion-in.com

  5. #5
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    By the way, I'm sure shane rivals me in the ASP category. Not to mention Kevin (he just plain out SCARES me with the stuff he knows ).

    Let me know what exactly you are trying to do, and I can better help you. Just minor details in how you'd like to use the DatePart function.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  6. #6
    SitePoint Zealot cckrocks's Avatar
    Join Date
    Nov 2000
    Location
    A home in the hills where the grass grows green an
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I just want a date in this format February 23, 2001
    I don't want it to say that it is Friday, February, 23, 2001 like vblongdate does.

    Heres what I have:

    Code:
    <% response.write(FormatDateTime(date(),vblongdate)) %>
    Last edited by cckrocks; Feb 23, 2001 at 20:54.
    Think beyond what is common...
    www.jaggedknife.com
    www.fusion-in.com

  7. #7
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Definately a question for Shane and / or KYank. I have minimal experience with this sort of question. Basically, what I would do is:
    Code:
    <%dim varDate, monthName
    varDate = Date()
    Select Case varDate
    Case "1"
         monthName = "January"
    Case "2"
         monthName = "February"
    Case "3"
         monthName = "March"
    'NOTE: Finish this off, you know
    End Select
    
    varDate = varMonthName & Day(Date) & ", " & Year(Date)%>
    Like I stated before, this is the quick version. I would PM Shane or KYank for help with this, at my example undoubtedly doesn't even work.

    Sorry I couldn't be of assistence
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)

  8. #8
    SitePoint Zealot cckrocks's Avatar
    Join Date
    Nov 2000
    Location
    A home in the hills where the grass grows green an
    Posts
    183
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    That's alright, I got it figured out:

    Code:
    <% response.write(MonthName(Month(Date)) & "&nbsp;" & Day(date()) & ",&nbsp;" & Year(date())) %>
    Think beyond what is common...
    www.jaggedknife.com
    www.fusion-in.com

  9. #9
    SitePoint Addict Drinky's Avatar
    Join Date
    Jan 2001
    Location
    England
    Posts
    338
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did a comparison of text fields in different browsers a while ago because I wanted to alter the width of the text boxes in server side code depending on the browser.

    Comparison: http://www.guntrisoft.com/dev/james/...textboxes.html

    although it's a bit of hassle because the size ratios are different depending on the font used in the box :O(
    Drinky

  10. #10
    Say WHA?! goober's Avatar
    Join Date
    Sep 2000
    Location
    United States
    Posts
    1,921
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    cckrocks,

    oh my goodness! Thank you so much! Even though you solved your own problem, I believed you solved one of mine as well! Sheesh, VBScript has a built-in function for everything.
    Sean Killeen [LinkedIn] [Twitter] [Web]

    Warning: Reality.sys corrupted. Universe halted. Reboot? (Y/N)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •