Cfinput 'datefield' always aligns to left
It appears that cfinput 'datefield' always aligns to left, I have tried everything I can think of to get it to align center (in the td, in a div, style in the input, etc) and it just wont align center, I even tried putting a bunch of in front of the input and it puts them on the right. Any Help would be appreciated.
Over the years I have moved away from using CF input validation and instead use jquery and the validation plug-in.
For a more direct answer, have you tried creating a "center" class with text-align set to !important:
.center{ text-align:center !important; }
Then adding this class to the cfinput tag?
Similar Messages
-
Problem with cfwindow and cfinput datefield
If you have a cfform that contains a cfinput type datefield that is displayed in a cfwindow there is a problem when you scroll the cfwindow.
That is if the form content causes the cfwindow to have scroll bar when you scroll the cfinput datefield stays where it is while the rest of the form scrolls with the window.
Does anyone have any idea how to fix this.
The code being used is as follows
<cfwindow
width="800"
height="200"
name="myWindow"
center="true"
title="Test Window"
modal="true"
initshow="true">
<br>
<cfform name="mycfform1">
<div style="float:left;">Date 1: </div>
<cfinput type="datefield" name="mydate1"><br><br><br>
<div style="float:left;">Date 2: </div>
<cfinput type="datefield" name="mydate2" value="15/1/2007"><br><br><br>
<div style="float:left;">Date 3: </div>
<cfinput type="datefield" name="mydate3" required="yes"><br><br><br>
<div style="float:left;">Date 4: </div>
<cfinput type="datefield" name="mydate4" required="no"><br><br><br>
<br>
<div style="float:left;">Date 1: </div>
<cfinput type="datefield" name="mydate5" mask="dd/mm/yyyy">
(dd/mm/yyyy)<br><br><br>
<div style="float:left;">Date 2: </div>
<cfinput type="datefield" name="mydate6" mask="mm/dd/yyyy">
(mm/dd/yyyy)<br><br><br>
<div style="float:left;">Date 3: </div>
<cfinput type="datefield" name="mydate7" mask="d/m/yy">
(d/m/yy)<br><br><br>
<div style="float:left;">Date 4: </div>
<cfinput type="datefield" name="mydate8" mask="m/d/yy">
(m/d/yy)<br><br><br>
</cfform>
</cfwindow>-Fernis,
Thanks for your help.
I know IE 7 is a problem, not using this one.
I'm actually using 8.0.6
I will need to do more research, maybe it's my doc type.
Anyway, thanks for testing.
Ken -
Hi Experts,
I have a problem in B1 query.
For example my query is as follow
Select 1.001
B1 query will show
1 : align by right
The problem is that the value is not 1.001
If I change the query
Select '1.001'
B1 query will show
1.001 : align by left
The value is ok, but the alignment is left. How to let the value align by right?
GlenThat is normal behavior of query result. The first one is number so that will be aligned right. The second one is text so that will be left. Everything within ' ' would be a text no matter it is letter or number.
Thanks,
Gordon -
MenuBar Component - Aligning Menu Left
Hello all,
I have a quick question. Is it possible to set the menubar
component so that it's submenu is configured to display to the left
( if it was on the far left of the screen)?
Currently I have it placed on the left side of the screen,
with text aligned to right. The following problems occur :
The arrows that are displayed when a menu has children is on
the right, is it possible to align it left?
The 2nd/3d level submenus open on TOP of their parent menu,
instead of to the left, like I would like them to.
Is there a sort of static property or something that I'm not
finding that is made to align the entire menu to the right?
Screenshot
HereCan you please explain why you have PHP code inside your CSS body selector?
PHP does not belong in your CSS code.
body{
<?php
// define variables and set to empty values
$nameErr = $emailErr = $genderErr = $websiteErr = "";
$name = $email = $gender = $comment = $website = "";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (empty($_POST["name"])) {
$nameErr = "Name is required";
} else {
$name = test_input($_POST["name"]);
// check if name only contains letters and whitespace
if (!preg_match("/^[a-zA-Z ]*$/",$name)) {
$nameErr = "Only letters and white space allowed";
if (empty($_POST["email"])) {
$emailErr = "Email is required";
} else {
$email = test_input($_POST["email"]);
// check if e-mail address is well-formed
if (!filter_var($email, FILTER_VALIDATE_EMAIL)) {
$emailErr = "Invalid email format";
if (empty($_POST["website"])) {
$website = "";
} else {
$website = test_input($_POST["website"]);
// check if URL address syntax is valid (this regular expression also allows dashes in the URL)
if (!preg_match("/\b(?:(?:https?|ftp):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+&@#\/%= ~_|]/i",$website)) {
$websiteErr = "Invalid URL";
if (empty($_POST["comment"])) {
$comment = "";
} else {
$comment = test_input($_POST["comment"]);
if (empty($_POST["gender"])) {
$genderErr = "Gender is required";
} else {
$gender = test_input($_POST["gender"]);
function test_input($data) {
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
Nancy O. -
Tabstrip's Push buttons are align by left in 1 place
Hi experts
I put a Tabstrip in my screen,but his Push buttons are align by left in 1 place,How can i do something to make the push buttons align 1 by 1.
BR
Chris huangThose MM Rollover Menus are awful. I'm not surprised you're having trouble with them.
The Sordid tale of MM Fireworks Menus
http://losingfight.com/blog/2006/08/11/the-sordid-tale-of-mm_menufw_menujs/
The best advice I can offer is to scrap the MM Rollovers you have now and use a good CSS Menu system.
DW Spry Menus
http://layersmagazine.com/spry-navigation-dreamweaver.html
CSS Express Drop-Down Menus (tutorial)
http://www.projectseven.com/tutorials/navigation/auto_hide/
List-O-Rama (Free DW Extension)
http://www.dmxzone.com/go?5618
Pop-Menu Magic2 by PVII (paid DW extension)
http://www.projectseven.com/products/menusystems/pmm2/index.htm
Nancy O.
Alt-Web Design & Publishing
Web | Graphics | Print | Media Specialists
http://alt-web.com/
http://twitter.com/altweb -
Documents always snap to left side of screen
My untabbed documents always snap to left side of the screen. I can't center them in the screen. How do I fix this?
I looked at it earlier Station, and he says
'I can't center them in the screen'
Does that mean the window is locked irrevocably snapped to the left of the screen, or only when it opens? I couldn’t think of any circumstances that might cause this to happen, so suspected it might be a Mac thing, and left it alone. I did try to replicate it though. -
Font just does not align totally left
Hi folks, I need to know, how i can align the text totally to the border of the text frame, as you can see in the picture it just does not align totally left.
I´ve been searching the web for solutions but did not find anything. I tried "Textrahmenoptionen" - I guess in english it´s text frame options, but there everything seems so to be right, please help me. Thanks in advanceCheck this thread:
Re: Text alignment to column (not baseline) guides -
I have 2 CFINPUT DateField on the form, one is Start ate and one is End Dated. Start Date is on top of End Date.
The Start Date Calendar goes behind End Date when users enter start date using Start Date control that users is unable to use calendar to enter date.
I would like to know how I can control that make Start Date Calendar in front of End Date Control while user enter information.
Your help and information is great appreciated,
regards,
IccsiHi. I was able to reproduce the same behavior you described in Internet Explorer 8, but only if I triggered compatibility mode in IE.
If it is possible for the page/site you are working on, I would recommend using a Document Type Definition (DTD) that triggers standards mode. For example, if I include the HTML5 doctype as the first line in the CFM file:
<!DOCTYPE html>
Then the page is rendered in standards mode and the datepicker overlays are rendered properly.
The HTML 4.01 strict doctype should also trigger standards mode:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
If you want to make the compatibility mode button disappear, so that users can't trigger it manually, you can include Microsoft's X-UA-Compatible header:
<cfheader name="X-UA-Compatible" value="IE=edge">
Normally you might see this ehader added via a meta tag, e.g.:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
However, if it is not part of the response header, it should be one of the first (if not the first) item after the opening head tag. Since cfform injects Javascript above any code you add to the head, the typical method won't work.
I hope that helps! -
My Audio setting start always in the left side. I mus go to System Prefernce every time to put it back in the middle.
If a Use the guest user, in nort problem there.
Any help??When going to a website the picture was small - tried changing the Zoom size , tried Zoom Reset - the text did change size but the layout distorts - found under View - Zoom - Zoom Text Only was checked --- Removed this check mark and the website returned to normal size and Zoom worked normally again. I am 99.9999% sure I did NOT check this myself and there is no one else on the computer to cause it. Maybe this will help.
-
Hi All,
the code below suppose to show a list with a few buttons below.
in this dialog i have only minor problem.
The problem is that all my buttons aligned to left size.
if i omit line number 193 (jButtonPane.setLayout(new GridLayout(1,nOfButtons,1,1))),
it centralized but i am loosing the behaviour of the buttons.
when i shrinking the dialog the button dissapear:
and i need that the button will show like:
[OK...] [Cancel...] etc...
how can i centralized the buttons and still not "lost" the buttons.
this is my code:
package test;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GraphicsEnvironment;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;
public class DialogFrame {
String Message2Show="Default Message";
JButton[] ButtonArray;
String [] btnArrayText;
String [] lineArray;
String Title;
int nOfButtons;
int nOfLines;
String[] data;
private JPanel jContentPane = null;
private JPanel jButtonPane = null;
private JPanel jmessagePane = null;
private JList MessageList=null;
private JScrollPane jScrollPane = null;
private JPanel jPanel2 = null;
private DefaultListModel listModel;
private static int DialogWidthPreferedSize=500;
private static int DialogHightPreferedSize=200;
final static boolean shouldFill = true;
final static boolean shouldWeightX = true;
final static boolean RIGHT_TO_LEFT = false;
//Specify the look and feel to use. Valid values:
//null (use the default), "Metal", "System", "Motif", "GTK+"
final static String LOOKANDFEEL = "System";
public DialogFrame() {
// TODO Auto-generated constructor stub
// creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
public DialogFrame(String message) {
// TODO Auto-generated constructor stub
ParseMessage(message);
// for test add data
AddData2Message();
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
private void createAndShowGUI() {
initLookAndFeel();
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame(Title);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Display the window.
int maxHeight = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0].getDisplayMode().getHeight();
int maxWidth = GraphicsEnvironment.getLocalGraphicsEnvironment().getScreenDevices()[0].getDisplayMode().getWidth();
frame.pack();
frame.setSize(DialogWidthPreferedSize, DialogHightPreferedSize);
frame.setLocation(GetWidth(maxWidth),GetHeight(maxHeight));
frame.setContentPane(getJContentPane());
frame.setVisible(true);
private void initLookAndFeel() {
String lookAndFeel = null;
if (LOOKANDFEEL != null) {
if (LOOKANDFEEL.equals("Metal")) {
lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName();
} else if (LOOKANDFEEL.equals("System")) {
lookAndFeel = UIManager.getSystemLookAndFeelClassName();
} else if (LOOKANDFEEL.equals("Motif")) {
lookAndFeel = "com.sun.java.swing.plaf.motif.MotifLookAndFeel";
} else if (LOOKANDFEEL.equals("GTK+")) { //new in 1.4.2
lookAndFeel = "com.sun.java.swing.plaf.gtk.GTKLookAndFeel";
} else {
System.err.println("Unexpected value of LOOKANDFEEL specified: "
+ LOOKANDFEEL);
lookAndFeel = UIManager.getCrossPlatformLookAndFeelClassName();
try {
UIManager.setLookAndFeel(lookAndFeel);
} catch (ClassNotFoundException e) {
System.err.println("Couldn't find class for specified look and feel:"
+ lookAndFeel);
System.err.println("Did you include the L&F library in the class path?");
System.err.println("Using the default look and feel.");
} catch (UnsupportedLookAndFeelException e) {
System.err.println("Can't use the specified look and feel ("
+ lookAndFeel
+ ") on this platform.");
System.err.println("Using the default look and feel.");
} catch (Exception e) {
System.err.println("Couldn't get specified look and feel ("
+ lookAndFeel
+ "), for some reason.");
System.err.println("Using the default look and feel.");
e.printStackTrace();
private JPanel getJContentPane()
if (jContentPane == null) {
jContentPane = new JPanel();
jContentPane.setLayout(new BorderLayout());
//FOR THE LIST
jContentPane.add(getMessagePanel(), BorderLayout.CENTER);
//FOR THE BUTTONS
jContentPane.add(getButtonPanel(), BorderLayout.SOUTH);
return jContentPane;
/******* FOR THE LIST **********/
private JPanel getMessagePanel()
if (jmessagePane == null)
jmessagePane = new JPanel();
jmessagePane.setLayout(new GridLayout(1,0));
jmessagePane.add(getJScrollPane(), null);
return jmessagePane;
private JScrollPane getJScrollPane() {
if (jScrollPane == null) {
jScrollPane = new JScrollPane();
jScrollPane.setViewportView(getMessage());
return jScrollPane;
private JList getMessage() {
if (MessageList == null) {
MessageList = new JList(listModel);
MessageList.setBackground(Color.cyan);
return MessageList;
/******* FOR THE BUTTON **********/
private JPanel getButtonPanel()
if (jButtonPane == null)
jButtonPane = new JPanel();
jButtonPane.setLayout(new GridLayout(1,nOfButtons,1,1));//test
jButtonPane.add(getJPanel2(),null);
return jButtonPane;
private JPanel getJPanel2()
if (jPanel2 == null)
jPanel2 = new JPanel();
jPanel2.setLayout(new GridLayout(0,nOfButtons));
//Cretae Buttons Dynamically Regard user request
ButtonArray=new JButton[nOfButtons];
//Crteate Button objects
for(int i=0;i<nOfButtons;i++)
getButton(btnArrayText,i);
//add buttons to panel
for(int i=0;i<nOfButtons;i++)
jButtonPane.add(ButtonArray[i]);
return jPanel2;
private JButton getButton(String Text,int ind) {
ButtonArray[ind] = new JButton(Text);
ActionListener l = new ActionListener()
public void actionPerformed(ActionEvent e)
JButton SelectedButton = (JButton)e.getSource();
String ac = SelectedButton.getActionCommand();
MyActionEvents(ac,SelectedButton);
ButtonArray[ind].setActionCommand(String.valueOf(ind + 1));
ButtonArray[ind].addActionListener(l);
return ButtonArray[ind];
private int GetWidth(int maxWidth){
int x=0;
x=(maxWidth/2)-(DialogWidthPreferedSize/2);
return x;
private int GetHeight(int maxHeight){
int y=0;
y=(maxHeight/2)-(DialogHightPreferedSize/2);
return y;
void ParseMessage(String message)
Title="";
String value="";
int loc;
/*****************TITLE TREATMENT*********************/
for ( loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++)
Title += message.charAt(loc);
//Title += ":";
/*****************BUTTON TREATMENT*********************/
message = (message.substring(loc+1)).trim();
value = "";
for (loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++) value += message.charAt(loc);
nOfButtons=Integer.parseInt(value);
btnArrayText=new String[nOfButtons];
for (int i=0; i<nOfButtons; i++)
message = (message.substring(loc+1)).trim();
value = "";
for (loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++) value += message.charAt(loc);
btnArrayText[i] = value;
/*****************TEXT TREATMENT*********************/
message = (message.substring(loc+1)).trim();
value = "";
for (loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++) value += message.charAt(loc);
nOfLines = Integer.parseInt(value);
lineArray = new String[nOfLines];
for (int i=0; i<nOfLines; i++) {
message = (message.substring(loc+1)).trim(); value = "";
for (loc=0; loc<message.length() && message.charAt(loc) != ':'; loc++) value += message.charAt(loc);
lineArray[i]=value;
private void MyActionEvents(String actionCommand,JButton SelectedButton)
int val;
val=Integer.parseInt(actionCommand);
switch(val)
case 1:
System.out.println("ac = " + actionCommand);
break;
case 2:
System.out.println("ac = " + actionCommand);
break;
case 3:
System.out.println("ac = " + actionCommand);
break;
case 4:
System.out.println("ac = " + actionCommand);
break;
case 5:
System.out.println("ac = " + actionCommand);
break;
case 6:
System.out.println("ac = " + actionCommand);
break;
case 7:
System.out.println("ac = " + actionCommand);
break;
case 8:
System.out.println("ac = " + actionCommand);
break;
int size = listModel.getSize();
String Name=SelectedButton.getText();
listModel.insertElementAt(Name,size);
//For testing
private void AddData2Message()
listModel = new DefaultListModel();
data=new String[lineArray.length];
for(int i=0;i<lineArray.length;i++)
listModel.addElement(lineArray[i]);
Tia
GabiThe arrow to open the tab history of the Back and Forward buttons has been removed in Firefox 4 and later.
Use one of these methods to open the tab history list:
* Right click on the Back or Forward button
* Hold down the left mouse button on the enabled Back or Forward button until the list opens
You can look at this extension:
* Backward Forward History Dropdown: https://addons.mozilla.org/firefox/addon/backforedrop/ -
How to align text(left, right or center) on a button?
I can not figure out how to align text on a button,
could someone help me out?
Thanks in advanceJButton btn=new JButton("hi");
btn.setHorizontalAlignment(int i)
i=0 center
i=2 left
i=4 right -
Moving objects in Keynote, always aligning
Okay, updated to ML (from SL) and updated my Keynote. And now I'm annoyed.
Prior to the update, I had precise control over my arrangement of objects when designing a slide.
Now, when using the mouse, objects jerk around the slide to align themselves with other objects (which is not always what I want).
I still have control with the arrow keys, but now it's a two-step process to get objects exactly where I want them.
Help returning things back to normal?Adjust the options in Keynote > Preferences > Rulers until it's to your liking. Or you can temporarily disable alignment guides if you hold down the Control key while dragging an object
Shane -
here's an example of a paragraph i've taken from wikipedia:
if you can see, in the paragraph aligned with the button "Justify with the last line aligned left" - the one above, i've marked with red lines the places in which a gap occurs all of a sudden, and i cannot undo them.
for the same paragraph below i used the simple "Align left" button.
can anyone please help me understand what has happened that made those gaps occur.
i use Adobe Design Standard CS 6 Middle East Version. this bug occurs in other font/languages as well.Thank you for providing the sample IDML file.
I still think it could be the used paragraph composer, maybe in conjunction with the used font. I'd change the composer to see, if the problem will go away.
@Willi – you are right, the story direction is RTL, but the paragraph direction is LTR. That's no surprise here since the ME version of InDesign was used.
I would change story direction to LTR, use the "normal" paragraph composer instead the global one.
Since the used font is not available to me, a substituted font is not showing the problem.
But that may mean nothing. I do not use the ME version of InDesign…
Uwe -
Hi, I have a simple question. I am using the following line
in my css file to apply a background image to a canvas:
Canvas {
background-image:
Embed("/images/Icons_Final/connected.png");
What would I do to align that image to the left of the
canvas. I can't seem to find any documentation on these specific
types of properties within CSS. Also, if anyone could point me
toward a nice concise list of all the properties available in
FLEX's CSS, I would greatly appreciate it. Thanks!CSS is not a substitute for HTML, it is a styling
companion… it stands for Cascading STYLE Sheets… It is
a method to apply uniform styles to a page or all of your pages on
your site. You still need to use the full functionality of HTML or
graduate to PHP, SQL, or other methods of adding functionality to
your site.
As for animated image links… use animated .gif files
and just apply a link to it. You will get all kinds of advice and
opinions on whether animated .GIFs are appropriate, classy, ugly or
tacky… but if animated links are what you want, they work.
If you want animation in the sense of Flash buttons, buttons
that blink, change colors, images, etc. when moused over or
clicked, you can use CSS for this effect.
Make 2 to 4 images with your graphics editor, sized to fit as
background images behind text. Try 100x15 pixels to start. Then put
this code in your CSS file for links:
.left a:link {
color: #FFF;
.left a:visited {
color:#CCC;
.left a:hover {
color: #FF6699;
background-image: url(images/left-hover.jpg);
.left a:active {
color: #F00;
background-image: url(images/left-hover.jpg);
I used this to define a left side and right side set of
links, but you could apply this to all your links or just a named
set.
This will produce links that can very closely approximate
flash buttons but still maintain a text based link that can be read
by the search engine browsers.
Hope this is helpful… -
How to set components aligned in left when we use BorderLayout
Hello All,
How to set the components aligned in the left when we use BorderLayout in a panel.Right now,the components are getting aligned in the center.
Any solutions?
Thanks in advance,
VijayBy default a JPanel uses a FlowLayout when created and by default a FlowLayout uses center alignment. Read the FlowLayout API to find out how to use left alignment.
Also each individual component has an alignmentX and alignmentY value which is set to 0.5 (center aligned). Some LayoutManagers will take this value into consideration. Read the Component API for more information.
Also, check out this section from the Swing tutorial on "Using Layout Managers":
http://java.sun.com/docs/books/tutorial/uiswing/layout/using.html
Maybe you are looking for
-
Adobe Acrobat 8.0 Professional
Why is there is requirement to renew my license and make payment, in other words I thought when I bought the program, I was free to use it for as long as I wished, have Abode decided to backdate their recent license changes to include such dated prog
-
Transition problems when exporting to flash
I built a DVD menu with transitions to the different submenus and when I exported the project to flash the transitions were in the wrong aspect ratio and at a lower quality. Is there a way to make it look more seamless? Thanks, Matt
-
LSOCP 200 Content Player Java Exception
Dear Collegues, I am encountering an issue with the LSOCP 200. Our client's infrastructure as follows: SAP R/3 Enterprise 4.7 Ext 2.00 LSO 200 0029 SAPK-200PTINLSO LSO 200 (Learning Solution - Back End) I LSOFE 200 0027
-
Issue with Aborting Instances in 10gR3
All, I have a business requirement where I need to be able to abort instances ( Parent & Child) for a particular Process. Here is what I do 1) in my parent Process I create a "Message Wait" while allows External Notification and also interrupts. I th
-
How to save in different worksheets in a single workbook
Hi Experts, I ran one query and I saved it as a new workbook. In the same query I drilled down with another characteristic and I need the output should be saved in the same workbook in sheet 2. Kindly do let me know how to save the different ouputs i