Edit element style in wordpress - css

I have a slider in my WP where pictures get cropped when I resize the window
Here is a picture of a slide when the website is fullscreen and besides is the same slide when I resize the window which we can see is cropped on the right:
click to open the image
(when "inspect element" I can see that element.style section that I didn't manage to find on my css files)
Then on the element inspector I edited the element.style by adding "background-position: center;" and when I resized again the window the picture did exactly what I wanted (it centered as I was resizing):
click to open the image
As I said I tried to find the css sheet where I could edit that but I learned that it could not be done that way and that I had to force the WP to update by adding css lines
I tried theses:
.animate-in[styles] {
background-position: center !important;
}
.animate-out[styles] {
background-position: center !important;
}
but didn't manage to get anything working...
Please help!

You don't find the css sheet because css was generated with javascript.
You can try :
#sequence li {
background-position: center !important;
}

Please at the very least post the url to your webpage so i can play with it. The SS is very low quality.
What you are seeing is known as an inline style, you can overwrite it with the !important tag. The element you are highlighting has an ID that you can target to over write this.
so in your child theme's stylesheet you can write
#widget-kopewidget_sequence_slider-2-sequence_slider-item-208 {
background-position:center !important;
}

Related

WordPress Theme Logo Invisible and no Parallax on Pages with plugin

I have a website that works fine if a certain plugin (Business Listing) is not activated. But once the plugin is activated the logo disappears on the pages it's on. If you click and drag on the space where logo is suppose to be it will show itself temperately until mouse button is released. The same for the image with parallax effect. It shows on the page but with no parallax effect.
I can't find the conflicting code. Any advice?
www.newstralia.co.za
It seems that a div that contains your image logo has zero opacity In Customize>>Custom CSS add this:
.pl-pro-version .pla-fade {
opacity: 1!important;
}
For your parallax image I guess you need something like this (again in Customize>>Custom CSS):
.pl-bg-cover {
background-attachment: fixed;
}
Consider that your image has small height and will stretch.

How to hover in CSS

I got an Image which is 400px x 685px. In the website, i set it will only show 200px x 685px. I want to know how to show the whole image when the mouse hover the image and show another half of the image 200px x 685px to 400px x 685px? Thank you
So I think a part of your css may looks like:
.your-class {
background: url("[the path of your image]");
background-size: 200px 685px;
}
then for when the mouse hover the image:
.your-class:hover {
background-size: 400px 685px;
}
Note that if you're using the <img> tag itself in your .html file, then you should write width and height instead of background-size. Anyway The code above is somehow what developers do in css in this case. But obviously it really depends on how you've structured your HTML with div tags and also the classes you've given to these tags.
you achieve by set
.selector:hover
{
background-size: 100% 100%;
}
I think an acceptable solution would be to create a div in your html. In your style sheet (aka - css file) you should define it with width:200px, height:685px; the next thing you want to do is to set all divs tags (or any id you give this fella) a background-image:url("whatever.png");
Now, you should also use the background-position:right (or left, your choice).
whta will happen so far? Your div will show half an image.
Now you should use div:hover as a new set of rules in your css, and there also use the background-position:left/right (the one you didnt use).
Tell me if it works.

semantic-ui layout with full screen image?

I am looking at semantic-ui for the first time and I was wondering how to make a layout where an image takes the full screen no matter what the size of the screen is and then when you scroll down to see the other sections, the menu is fixed at the top.
To illustrate, here are some examples:
http://yootheme.com/demo/themes/wordpress/2015/gusto/?style=default
http://yootheme.com/demo/themes/wordpress/2015/venice/?style=default
http://yootheme.com/demo/themes/wordpress/2015/helios/?style=default
http://layoutnet.com.br/
http://yootheme.com/demo/themes/wordpress/2015/finch/?style=default
Go to the examples in your semantic-ui source file and open the homepage.html with your editor.
In the style tag and this :
.masthead {
background-image: url('bg.jpg') !important;
background-size: cover !important;
}
Now open the file in your browser and view the change as you wanted.

Background png not showing up?

This website (click) should look like this website here (click) for the most part. The first link is in BVCommerce cart, the second was the initially designed HTML and CSS. You'll notice on the first link the center content is slightly off center as well as missing the background with the shadow, which is my main issue. (The image that should be showing up is images/bg.png)
There are a few bugs with the first website but I'm really just trying to get this background to show up properly.
First website CSS: justicejewelers.com/css/styles.css
Second Website CSS: justicejewelers.rcmhosting.com/css/styles.css
First Website Image: justicejewelers.com/images/bg.png
Second Website Image: justicejewelers.rcmhosting.com/images/bg.png
UPDATE
I've combined the bar and background gif to save some heartache. But any ideas on how to get the whole center area shifted to the right properly?
I do not know about your main issue, but on the first page I would change the text inside the head. Search robots such as Google will often ignore pages with too much information in the head due to spam protection.
I believe you have something like this in the CSS:
.wrapper { background: url("images/bg2.gif") repeat-y scroll center top transparent; padding-top: 0; }
and it overrides this:
.wrapper {
background: url("../images/bg.png") repeat-y scroll center top transparent;
padding-top: 0;
}
About background error, Firebug shows no-repeat :
/BVModules/Themes/Painted%20Paper/styles/styles.css :
url("../images/bg.png") no-repeat scroll left top transparent;
Also, your #maincontent div is smaller than the width of the background image (you have no padding in the first website (1016 pixels versus 960 pixels)
I guess you should remove /BVModules/Themes/Painted%20Paper/styles/styles.css CSS link
and give a try to a helper like Firebug :)

Facebook Like Widget on Fan page, Comment area out of visible area

When using the like or send widget on a Fan Page (no mater if you use iframe tag or fbml for it) the overlay for commenting is positioned always to the right. see
http://twitpic.com/4q7ggi for example.
I cant find a way to get the widget to respect the 520px boundary of the facebook tab.
see http://www.facebook.com/pages/Ludwig-Test/127771653944246?sk=app_101150316644842 for an example.
Anyone an idea how to solve this ?
TIA
Rufinus
Try adding this to your css:
.fb_edge_comment_widget {
margin-left: -350px;
}
This will move comment box to the left, but the little arrow pointing to the button will move too (which you could try to cover with another element). It will only work if you're using XFBML, not an iframe.
Here's an example.
I had to move the little arrow to the bottom, and that's how i did it.
1) Move your popup window to the desired position. Use the !important statement to overwrite default styles.
.fb_edge_comment_widget {
top: -224px !important; left: -246px !important; height: 191px;
background: url(../img/arrow-down.gif) 0 100% no-repeat
}
This style also contains a new arrow image which replaces the bottom line of the popup window. It contains my own new bottom arrow, which is blue (#283E6C) by default and grey inside (#F2F2F2). We can use height to adjust the vertical position and move the background image to the bottom.
The image will look like this:
.
2) Apply overflow: hidden to the span that wraps the iframe, We'll be able to cut off parts of the iframe by applying margin-top in step 3, and replace them with our own.
.fb_edge_comment_widget > span {
height: 184px !important; overflow: hidden; border-top: 1px solid #000;
}
I'm using border-top to create my own upper border, since in step 3 we are cutting of the default border and arrow.
3) Move the iframe up a bit to cut off its upper border and arrow.
.fb_edge_comment_widget > span > iframe {
margin-top: -7px;
}
The result looks like this in my case:
If you're using the XFBML implementation of the Facebook Like button, you can use CSS to re-position the "flyout" menu relative to its original position near the Send button:
The above example using jsFiddle and this CSS:
.fb_edge_comment_widget {
margin-left: -343px;
}
Since the contents of the "flyout" are inside an iframe you won't be able to apply any CSS to it — meaning, moving the triangle indicator to the right side of the "flyout" isn't possible.
Web browsers have tightened security on cross-frame scripting due to spoofing and other hacks, so iframes are treated like separate HTML pages with their own CSS and JavaScript.
For any advanced CSS styling, you would have to inject the Facebook Widget's iframe using DOM Scripting ... and even then it may not work across browsers.
Not a great answer but the only option I have found is to wrap the widget in an absolutely positioned Div to keep it on the left side of the window
To fix it I strongly recommend to put the Facebook widget on the left side of your page. Any other solution could work for a certain period of time, but in the future will fail.
The reason is that Facebook updates its widget frequently.

Resources