New Posts  All Forums:Forum Nav:

Simple CSS help

post #1 of 7
Thread Starter 
I had help designing a simple website and I have to add this one little description text area by myself. I got the MySQL database stuff working its just the formatting of the text area I'm trying to get.

I kind of just looked at what was there and tried to do the same thing with a text area. I have zero CSS experience.

.form_row {
width: 300px;
padding: 2px;
background: #CCC;
margin-bottom: 3px;
}

.form_row label {
width: 125px;
float: left;
}

.textarea {
width: 300px;
height: 300px;
padding: 2px;
background: #CCC;
margin-bottom: 3px;
}

.textarea label {
width: 125px;
float: left;
}

The .form_row was already there, I added the text area, for the following php code

<div class="form_row"><label>Price*</label><input type="text" name="price" /></div>
<div calss="textarea"><label>Description</label><input type="text" name="description" /></div>

once again the form row thing was there I just want to add the text area. I want people to be able to add a description (obviously) but it comes out just as a plain 300px wide box that isnt formatted like the rest of the inputs...

how do I fix that?
OC Beast
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8500 @4GHZ Gigabyte P45 4850x2 2GB IT LIVES! 4GB 
Hard DriveOptical DriveOSMonitor
500AAKS+250external CD-DVD combo windows 7 ultimate x64 26" 
KeyboardPowerCaseMouse
MC$ wireless 650w corsair antec 900 Logitech battlefield 2142 G5 
  hide details  
Reply
OC Beast
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8500 @4GHZ Gigabyte P45 4850x2 2GB IT LIVES! 4GB 
Hard DriveOptical DriveOSMonitor
500AAKS+250external CD-DVD combo windows 7 ultimate x64 26" 
KeyboardPowerCaseMouse
MC$ wireless 650w corsair antec 900 Logitech battlefield 2142 G5 
  hide details  
Reply
post #2 of 7
I think what you want is to id the actual inputs and then use those selectors.
Rena
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x6 1055T Asus M4A88TD-M/USB3 XFX 8800gt 512mb 2x2GB 1333MHz 
Hard DriveOptical DriveOSMonitor
250gb WD + 1tb WD + 2tb WD LG GSA-H55L Aptosid amd64 Samsung Syncmaster 216BW 
KeyboardPowerMouse
Genius Thermaltake TR2 W0379RU 500W Generic Microsoft Mouse 
  hide details  
Reply
Rena
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x6 1055T Asus M4A88TD-M/USB3 XFX 8800gt 512mb 2x2GB 1333MHz 
Hard DriveOptical DriveOSMonitor
250gb WD + 1tb WD + 2tb WD LG GSA-H55L Aptosid amd64 Samsung Syncmaster 216BW 
KeyboardPowerMouse
Genius Thermaltake TR2 W0379RU 500W Generic Microsoft Mouse 
  hide details  
Reply
post #3 of 7
Thread Starter 
I don't know what you mean by that.

The input, data management and all that is fine, its just the way the text area appears that isn't right.
OC Beast
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8500 @4GHZ Gigabyte P45 4850x2 2GB IT LIVES! 4GB 
Hard DriveOptical DriveOSMonitor
500AAKS+250external CD-DVD combo windows 7 ultimate x64 26" 
KeyboardPowerCaseMouse
MC$ wireless 650w corsair antec 900 Logitech battlefield 2142 G5 
  hide details  
Reply
OC Beast
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8500 @4GHZ Gigabyte P45 4850x2 2GB IT LIVES! 4GB 
Hard DriveOptical DriveOSMonitor
500AAKS+250external CD-DVD combo windows 7 ultimate x64 26" 
KeyboardPowerCaseMouse
MC$ wireless 650w corsair antec 900 Logitech battlefield 2142 G5 
  hide details  
Reply
post #4 of 7
Code:
#price { /* make me look pretty */ }
or just
Code:
.generic_form_div input { /* blah */ }
Code:
<div class="form_row"><label>Price*</label><input type="text" id="price" name="price" /></div>
oh and I just noticed
Code:
.textarea {
you probably want
Code:
.textarea input {
Rena
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x6 1055T Asus M4A88TD-M/USB3 XFX 8800gt 512mb 2x2GB 1333MHz 
Hard DriveOptical DriveOSMonitor
250gb WD + 1tb WD + 2tb WD LG GSA-H55L Aptosid amd64 Samsung Syncmaster 216BW 
KeyboardPowerMouse
Genius Thermaltake TR2 W0379RU 500W Generic Microsoft Mouse 
  hide details  
Reply
Rena
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x6 1055T Asus M4A88TD-M/USB3 XFX 8800gt 512mb 2x2GB 1333MHz 
Hard DriveOptical DriveOSMonitor
250gb WD + 1tb WD + 2tb WD LG GSA-H55L Aptosid amd64 Samsung Syncmaster 216BW 
KeyboardPowerMouse
Genius Thermaltake TR2 W0379RU 500W Generic Microsoft Mouse 
  hide details  
Reply
post #5 of 7
Thread Starter 
ah I got it thanks, and another totally unrelated question:

I have price as an INT in my MySQL database, people are putting in dollar signs ($) so it just comes up blank. Is there a way to have it format the input correctly or generate an error and have the person re-input the information as just numbers?
OC Beast
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8500 @4GHZ Gigabyte P45 4850x2 2GB IT LIVES! 4GB 
Hard DriveOptical DriveOSMonitor
500AAKS+250external CD-DVD combo windows 7 ultimate x64 26" 
KeyboardPowerCaseMouse
MC$ wireless 650w corsair antec 900 Logitech battlefield 2142 G5 
  hide details  
Reply
OC Beast
(13 items)
 
  
CPUMotherboardGraphicsRAM
E8500 @4GHZ Gigabyte P45 4850x2 2GB IT LIVES! 4GB 
Hard DriveOptical DriveOSMonitor
500AAKS+250external CD-DVD combo windows 7 ultimate x64 26" 
KeyboardPowerCaseMouse
MC$ wireless 650w corsair antec 900 Logitech battlefield 2142 G5 
  hide details  
Reply
post #6 of 7
Not with html/css, you probably want js validation and you need php/what ever language you're working in to validate it server side.
Rena
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x6 1055T Asus M4A88TD-M/USB3 XFX 8800gt 512mb 2x2GB 1333MHz 
Hard DriveOptical DriveOSMonitor
250gb WD + 1tb WD + 2tb WD LG GSA-H55L Aptosid amd64 Samsung Syncmaster 216BW 
KeyboardPowerMouse
Genius Thermaltake TR2 W0379RU 500W Generic Microsoft Mouse 
  hide details  
Reply
Rena
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II x6 1055T Asus M4A88TD-M/USB3 XFX 8800gt 512mb 2x2GB 1333MHz 
Hard DriveOptical DriveOSMonitor
250gb WD + 1tb WD + 2tb WD LG GSA-H55L Aptosid amd64 Samsung Syncmaster 216BW 
KeyboardPowerMouse
Genius Thermaltake TR2 W0379RU 500W Generic Microsoft Mouse 
  hide details  
Reply
post #7 of 7
javascript can be disabled in the browser. It's best to use PHP/ASP/etc. to check and remove the dollar sign if it's there or check if it's an integer value and if not, display some kind of message so that people enter it correctly.
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding