• 0

DMS ignores textarea width/cols


Question

Posted · Report post

It seems that DMS ignores the "cols" attribute that is connected to the textarea tag.

 

When I enter the some code in a TextBox section in DMS and the same code works fine on a blank .html-site (made in the FTP-client Flow), it doesn't affect the width (cols) of the textarea in DMS. No matter what value I set, it's full width and the button gets stuck on a new line.

 

Am I doing something wrong or is it just something DMS ignores?

 

The code on the site

[attachment=1443:form_site.png]

 

The code in Flow

[attachment=1444:form_flow.png]

Share this post


Link to post
Share on other sites

4 answers to this question

  • 0

Posted · Report post

Hi,

 

What is that code, can you provide the code you have used and a link to your site please. Not sure what you mean by cols, DMS doesn't use anything called cols, that is most likely related to the Flow code ?

 

What I would do is use the PageLines grid to create two columns one for your text field and the other for you button for example.

 

<div class="row">

<div class="span10">

Enter your text field code here

</div>

<div class="span2">

Enter your button code here

</div>

</div>

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Danny - thanks for the reply.

 

Unfortunately I can't provide a link for the site as the part isn't live.

 

The code is in the images above, but I've pasted it below.

Submit your e-mail and you'll receive project updates when there's more to tell.<form name="input" action="html_form_action.asp" method="get"><textarea placeholder="your@e-mail.com" rows="1" cols="30"></textarea><button type="submit" class="btn btn-success"><i class="icon-thumbs-up-alt icon-white"></i> Keep me updated!</button></form>

As I wrote "cols" is an attritube connected to the textarea tag - http://www.w3schools.com/tags/tag_textarea.asp

 

I guess using the grid would work, but I'd like to control the width (the cols) as well - not just by giving it a specific span size.

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Not sure to be honest, I rearely use cols.

 

However, you can try this:

<form name="input" action="html_form_action.asp" method="get" class="mytextform"><textarea placeholder="your@e-mail.com" rows="1" cols="30"></textarea><button type="submit" class="btn btn-success"><i class="icon-thumbs-up-alt icon-white"></i> Keep me updated!</button></form>

 

I added a class to the form, called mytextform

 

Then add the following CSS:

 

.mytextform textarea {
max-width: 80%;
margin: 0 5px 0 0;
}
1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

The CSS tweak helped, thanks Danny!

 

It just seems weird that DMS/Wordpress ignores the cols tag as it's part of HTML5.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now