Delphi For PHP Forums       


Go Back   Delphi-PHP Forums > Website Design > General Website Design
Forum Jump Register FAQ Members List Downloads Search Today's Posts Mark Forums Read

General Website Design General discussions about website design can be found here.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 15th January 2010, 12:54
D4PHP User
 
Join Date: Mar 2009
Posts: 19
thefunkyjoint is on a distinguished road
Default How to CSS for diferent types ?

Hello,

I have an application in d4php using smarty and css.

What i want is to define different styles for different classes of inputs.
For instance, here a sample of my CSS :

input {
padding:2px;
border:1px solid #6A6A6A;
font: normal 1em Tahoma, sans-serif;
color:#000000;
}

Problem is this style is applied for all inputs, includind texts, checkbox and buttons. I'd like to define different styles for buttons and checkboxes.

I tried input[type="checkbox"] but this not work.

I know i can do it using class, but i don't know how to attribute a class to a checkbox, so the generated html will have a class and i can using .classname in CSS.

Any ideas will be very appreciated.

Thanks in advance !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 15th January 2010, 12:57
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,272
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

Did you try the style property?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 15th January 2010, 13:27
D4PHP User
 
Join Date: Mar 2009
Posts: 19
thefunkyjoint is on a distinguished road
Default

Hello,

Thanks for your answer.

I don't want to use Styles in D4php, because i want to isolate the interface from the php code. So i'm using the CSS directly into the html template. D4PHP does not know if i'm using CSS or not.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 15th January 2010, 16:39
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,272
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

What I meant was to assign a style to them - without - using a d4php style to see if it sends that code out. If it does it should do what you want.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 15th January 2010, 18:26
D4PHP User
 
Join Date: Mar 2009
Posts: 19
thefunkyjoint is on a distinguished road
Default

Hello 405,

Yes, this way will work, but i have to assign the style to each component... i'd like to assign only once for each component type.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 15th January 2010, 21:57
405hp's Avatar
Firebug Fanatic
 
Join Date: Dec 2007
Location: State of Confusion
Posts: 3,272
405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute405hp has a reputation beyond repute
Default

Some place on here is the code to iterate through all components on a form and if they = the obj type you are looking for you do something to them.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT +1. The time now is 16:28.




Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0 ©2009, Crawlability, Inc.
Copyright © 2004 - 2009, G&J Solutions Ltd. All Rights Reserved. terms of use