CSS for circumventing ananoymous DIV -


I am using a CMS, when a form is created then all its contents are wrapped with To comply, it is called "Anamika", XHTML, unfortunately the subject was designed without this insight and then the submit button is CSS:

 . Contact form div.control input [type = submit]   

This works if markup is:

  & lt; Section class = "contact" & gt; & Lt; Form & gt; & Lt; div class = "control" & gt; & Lt; Input type = "submit" / & gt;   

However, because of this additional DIV added by CMS:

  & lt; Section class = "contact" & gt; & Lt; Form & gt; & Lt; Div & gt; & Lt; div class = "control" & gt; & Lt; Input type = "submit" / & gt;   

How can I write a bit more adaptive CSS, so additional markup does not affect it much, but without styling different elements through the ID or class ?? ?

Your selector can still select the input, so div Will not affect it. If the division layout is causing problems, you may need to create an inline element in this way:

section & gt; Form & gt; div {display: inline}

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -