Duplicate attribute class causing site validation error

The following bit of code results in a duplicate attribute site validation error. This template script: <div class=”clearfix” <?php post_class() ?>> produces this source output: <div class=”clearfix” class=”post-263 post type-post status-publish format-st… WordPress adds its own post-related classes to format the blog entry. Is there any way I can add my “clearfix” class to the … Read more

What are -moz- and -webkit-? [duplicate]

This question already has answers here: Why do browsers create vendor prefixes for CSS properties? (2 answers) Closed 2 years ago. -webkit-column-count: 3; -webkit-column-gap: 10px; -webkit-column-fill: auto; -moz-column-count: 3; -moz-column-gap: 10px; -moz-column-fill: auto; I am a beginner at CSS and when I was looking at some CSS code the other day, I found these lines. … Read more

how to include javascript file and css file in wordpress

I am creating new plugin so i need add a java script file and css file. These are my javascript files jquery.min.js jquery-1.3.2.min.js jquery.tabify.js Css file: newstyle.css 1 Answer 1 WordPress already ships with jQuery. There is no need to include it in your theme. Javascript Let’s say your jquery.tabify.js file is located in /js/jquery.tabify.js … Read more

What is the difference between id and class in CSS, and when should I use them? [duplicate]

This question already has answers here: What’s the difference between an id and a class? (17 answers) Closed 5 years ago. #main { background: #000; border: 1px solid #AAAAAA; padding: 10px; color: #fff; width: 100px; } <div id=”main”> Welcome </div> Here I gave an id to the div element and it’s applying the relevant CSS … Read more

get_stylesheet_uri returns wrong path

I am using the roots theme. Inside scripts.php, the stylesheets are loaded using the wp_enqueue_style-function. wp_enqueue_style(‘roots_bootstrap’, get_template_directory_uri() . ‘/assets/css/bootstrap.css’, false, null); wp_enqueue_style(‘roots_bootstrap_responsive’, get_template_directory_uri() . ‘/assets/css/bootstrap-responsive.css’, array(‘roots_bootstrap’), null); wp_enqueue_style(‘roots_app’, get_template_directory_uri() . ‘/assets/css/app.css’, false, null); I tried to add my own stylesheet (style.css, it can be found directly inside the template folder) the same way: wp_enqueue_style(‘fsc’, get_stylesheet_uri(), … Read more

Adding asterisk to required fields in Bootstrap 3

My HTML has a class called .required that is assigned to required fields. Here is the HTML: <form action=”/accounts/register/” method=”post” role=”form” class=”form-horizontal”> <input type=”hidden” name=”csrfmiddlewaretoken” value=”brGfMU16YyyG2QEcpLqhb3Zh8AvkYkJt” /> <div class=”form-group required”> <label class=”col-md-2 control-label”>Username</label> <div class=”col-md-4″> <input class=”form-control” id=”id_username” maxlength=”30″ name=”username” placeholder=”Username” required=”required” title=”” type=”text” /> </div> </div> <div class=”form-group required”><label class=”col-md-2 control-label”>E-mail</label><div class=”col-md-4″><input class=”form-control” id=”id_email” … Read more