Problem with form width in form templates

Author Message

Tor Olav Steinsvoll

Saturday 26 July 2003 3:20:12 am

I hope that there is someone that can help me a bit here. I have trouble with setting the size of the form. I tried to put the form inside a table and set the width of the table but that didn't work. I also tried to set style in a stylesheet, but that didn't work either.

Here is the code I am using:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
{default content_object=$node.object
content_version=$node.contentobject_version_object
node_name=$node.name}

<form method="post" action={"content/action"|ezurl}>

<b>Subject</b>

<div class="skjema">{attribute_view_gui attribute=$node.data_map.subject}</div>

<b>Feedback</b>

<div class="skjema">{attribute_view_gui attribute=$node.data_map.feedback}</div>

{section name=ContentAction loop=$content_object.content_action_list show=$content_object.content_action_list}
<div class="block">
<input type="submit" name="{$ContentAction:item.action}" value="{$ContentAction:item.name}" />
</div>
{/section}

<input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
<input type="hidden" name="ContentObjectID" value="{$content_object.id}" />
<input type="hidden" name="ViewMode" value="full" />

</form>

{/default}

</body>
</html>

Can someone please tell me what I am doing wrong here?

Regards from Tor Olav

Robin Sørlie

Saturday 26 July 2003 3:35:00 am

What do you mean by form width? I assume you mean the box where visitors can write their stuff. You can try this:

<b>Subject</b>

<div class="skjema" style="width: 200; height: 20">{attribute_view_gui attribute=$node.data_map.subject}</div>

<b>Feedback</b>

<div class="skjema" style="width: 200; height: 20">{attribute_view_gui attribute=$node.data_map.feedback}</div>

Just alter the width to what you need. Pretty sure you can spesify this in .css to.

-Robin

Tor Olav Steinsvoll

Saturday 26 July 2003 8:58:33 am

Thanks for your help Robin, but I got the same result as before. The texfield is way to wide.

I think it has to be some override I don't understand here. What you told me I tried to do in the CSS file too.

Any other suggestions?

Regards from Tor Olav

Bjørn Kaarstein

Monday 28 July 2003 12:10:16 am

Try to copy the core.css from standard to your own stylesheets folder. Then I think you need to alter some of the items under /* FORMS */. Like i.e. input.box, textarea.box
{
width: 200px;
}

Regards Bjørn

Robin Sørlie

Monday 28 July 2003 6:18:37 am

Yes, that might work, try to alter this in core.css:

/* FORMS */

form
{
padding: 0px;
margin: 0px;
}

input.box, textarea.box
{
width: 468px;
}

input.halfbox, textarea.halfbox
{
width: 230px;
}

Didn't think of that cause you didn't have any reference to this class in your html code, but since you use the attribute function I guess this automaticly points to core.css

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.