Force layout on Woocommerce product page - css

I am using the woocommerce order builder plugin on the shopkeeper wp theme.
in the default advertised look, the order builder should take over the product page making it easily legible but this theme seems to have its own rules.
instead of the full page, I get the woocommerce placeholder image on the left of the page and the order builder squeezed into the right side making it hard to comprehend what you are ordering.
I read somewhere I need to "use CSS to force the element you want into correct positions and display" but don't know how to go about it.
your help is sorely needed.

Big caveat: I think you're much better off editing the HTML here - removing the section you don't want and adjusting the column styling classes on the part you want to widen. Hooks can provide a clean way to do this, or you can override template files: https://docs.woocommerce.com/document/template-structure/
But, in the interest of getting you a quick (albeit hacky) fix, here's some CSS for you:
.product_content_wrapper>.row>.large-6.medium-12.columns {
display: none;
}
.product_content_wrapper>.row>.large-4.xlarge-5.xxlarge-5.large-push-0.columns {
width: 100% !important; /** This is the really hacky part**
}
This could have unexpected and unintended results in the long term, because, although it is as precisely targeted as possible, it is re-styling helper classes in unintended ways.

Related

Wordpress CSS ruining custom pages

I created a real estate search page in PHP. I then created a custom page template in WordPress and added it to the site. http://geekoutaustin.com/homesearch/
I created everything mostly sticking to Bootstrap to avoid conflicts but as you can see the WordPress CSS has changed everything and looks terrible.
Is there an easy fix to this or do I have to rename everything and give it new CSS?
Underscores the "cascade" part of CSS.
Order of CSS on file and loading might help, but that is wonky and not reliable.
Use of more direct selection and/or use of !important declaration might bail you out. Alo not perfect.
A better solution is to wrap the page in a high level id or class (ID better IMO). Everything inside the aforementioned CSS id will then get direct/compound selection. This pattern allows explicit correction for the page ONLY if done correctly. This could be duct-tape over masking tape, make a good choice.
There is a lot fo potential, here's a low level primer:
#some-id .some-class has higher priority over .some-class
#some-id .some-class div has higher priority over .some-class div
There are MANY More solutions - I am suggesting a "get it done" approach that is not all tech debt or a week lost.
Possibly split off the CSS for the page and only load as needed.
Otherwise, re-do.

Need help for the category posts layout in wordpress

On my wordpress website, I am using NewsCard theme referring this youtube tutorial.
I have added categories to Menu but I am running into a strange problem.
As visible in the below image, I am getting huge gutters between the news cards which is ugly and resulting into the cards layout as very long vertical post cards.
Can someone help me resolving this? I am not able to figure out what I am doing wrong here. I was using generatepress theme earlier.
The more natural layout should be:
Thanks in advance.
In the file https://examtipsindia.com/wp-content/plugins/gp-premium/blog/functions/css/style.min.css?ver=1.12.2 this rule is adding the issue
.generate-columns.grid-50, .grid-sizer.grid-50 {
width: 50%;
}
I can't see without accessing your admin the best way to add a custom CSS rule to fix the one above, but as I don't see a child theme or plugin, go to Appearance > Cutomize > Additional CSS, add the CSS below and "Publish" to save the changes:
body.archive.category #main .generate-columns.grid-50{
width:auto;
}
That should do it, but if it doesn't let me know.

Wordpress child theme causes padding changes without modifications

Stewartside helped me use JQuery to create a specific function for my main navigation on my website (thanks again!). I created a child theme to add the changes to my header.php file and it has started to cause a weird layout change. My homepage should have 20px padding, which is NOT a special CSS modification, but the child theme automatically removes it. This doesn't happen with other pages on my site, just the homepage. I have also added/removed the jquery code to make sure that wasn't the problem; the style.css file for the child theme only has the "child theme" coding, no modified CSS.
Homepage: http://bostonirishclothing.com
About Us: http://bostonirishclothing.com/about-us
Is there anything that would cause this?
Get the Firebug add on for your browser (available on Chrome and Firefox). Then right click the section that is causing the issue and you can see the coding and all the relevant CSS functions including the files they are in (to the chosen section). It will also show which CSS function is being prioritised compared to the other. Then you can modify the functions or add new ones to make it work.
A dirty way to do things is to use !important however this should only be used sparingly as it can screw with other pages. An easy way to avoid that is to make the CSS function for example .entry-content { color:#fff; } becomes .post-x .entry-content { color:fff!important; }
Test things out. Firebug is amazing help when editing CSS. You can even do some of the tests in firebug itself.

exclude theme from a specific container

I am making a theme for a website managed by plone using diazo and at least parts of twitter-bootstrap. Personally I'm not all too happy about that combination, but it was requested that way.
Now I was informed the other day that there will be some portlets that suppose to come in their own design, styled in an editor insinde plone (the editor seem to write the styles straight into the html). Meaning no further theming should be applied but bootstrap css recognizes the pattern and hijacks it anyway.
I tried to block that by using a form of <notheme css:if-content=".theStaticPortlet" /> but ended up having the theme blocked on the entire site whenever a container like this was found.
Is there a way of excluding a specific container/class from being bothered by the theme while everything around it stays themed like before?
With lesscss you can do something like that:
.theStaticPortlet {
// put your specific portlet css here
}
:not(.theStaticPortlet) {
// copy or import all your regular site css here
}
From what I understand your question is purely about Bootstrap and its CSS interfering with Plone markup. Exactly which styles are being applied on your portlet? I'd bet it has to do with the DL/DT/DD tags. If so you could use Diazo to replace those with DIVs or some other neutral tags - on Bootstrap's understanding, of course.

Fix a CSS problem with a Wordpress theme and a syntax highlighting plugin

I installed the latest version of Wordpress and added the WP-Syntax plugin (and also the Markdown Extra plugin, but I think it's unrelated to this issue).
It works perfectly with both themes that ship with Wordpress: looking good using WordPress Default 1.6 and looking equally good with the WordPress Classic 1.5 theme.
However it doesn't work with the excellent LightWord theme, which I would like to use. The code box looks strange with the right border at the end of the actual code:
My thoughts:
I have tried investigating this with Firebug without any success. The CSS from the WP-Syntax plugin should be the same in all three theme cases. So the fact that it looks wierd with this theme has to do with some inherited CSS property from the LightWord theme.
This in turn probably means that the WP-Syntax plugin should reset something more for its CSS to work correctly.
Help!
Advanced CSS isn't something I'm good at. But I would very much like to resolve this problem as soon as possible. I'm also curious from a technical view point what could be causing this behavior? I hope someone with good CSS skills will be able to help out!
We (you if you want to, me if you don't feel like it) could then file a bug report in the appropriate place, to get these components working together.
To resolve this I understand you need more than screenshots. I have a link with the problem theme, which could be used to investigate further.
Web site where the problem may be experienced (Taken down as the problem is solved)
Edit: In response to a comment I'm also including a link to the working web site using the classic theme and the same plugin setup: Link to a working theme with these plugins (Taken down as the problem is solved)
Thank you for reading!
Summary of problems I'd like to solve:
What's the best way to get rid of the right and bottom inner border in the code box? I first noticed the right border, but the bottom border is also an eye sore.
The code box right border isn't visible. It's due to .wp_syntax {width:100%;} and if I set it to 99% it's visible again. Do you consider this to be a problem with the theme or the plugin?
Making changes in the theme (style.css) or the plugin (wp-syntax.css) would be preferred if that's possible, so one of them could be standard. But which one? And how?
The problems you are having are due to the stylesheets of WP-Syntax and LightWord interfering with each other. I don't really think that the problems are with the theme or the plugin, they are just down to how the two interact with each other.
To make all of the required changes, ideally you would edit styles in both wp-syntax.css and style.css. You can however cheat a little.
In style.css add the following:
.wp_syntax { width:auto; }
.wp_syntax table { border:0 !important; }
.wp_syntax table td { border:0 !important; }
These changes should solve all of the problems, with the benefit of keeping all of the changes localised to a single file (style.css of the LightWood theme). The other tables in the example should all remain unchanged as well.

Resources