CSS rollover working on one page, but not another - css

I'm replacing all Fireworks-generated table-based rollovers on my site with CSS rollovers; I've so far had luck with my menu bar, which works properly on each page on the site.
Today I tried to update my main page's marquee (div id="titlemain" on theapplenewsreel.com), and while the rollovers seem to work fine on the staging page where I designed and tested said element (theapplenewsreel.com/titlemain.html), the code refuses to work when I integrate it into the page where I intend to use it. I've checked the link to the stylesheet; it points to the exact same CSS file. Can anyone suggest a reason why the marquee's share links don't update on the index.html file?

Try updating the CSS to include px in the background position numbers:
#titlesharefb:hover {
background-position: 0 -80px;
}

Related

CSS relative position acts different on different pages

I've been trying to debug a web site to speed it up. I search a plugin in wordpress and I found Autoptimizer and decided to use it. After minifying CSS files and inline CSS files, some bug appeared in the blog. I saw that web pages act like they are on mobile-view mode except index.php so home page. I do not know how to solve it and I could not fix it.
This is the homepage of wordpress website. As you see footer is good positioned. But when you check the other pages such as this one, it is aligned like I open the web page in a mobile device. Not only footer but all body parts, elements, classes act like they are in a mobile device.
I deactivated the CSS options of AutoOptimizer but afterwards some HTML elements got broken. That's why I re-activated the plugin and thought this problem (instead of some broken tags) can be solvable than other one.
Please help me. I think sharing CSS codes is unnecessary because you can display them easily with dev options in browser. Even I compared their container classes. I try to find differences between container div in index.php and container div in other pages but they are the same classes and have same attributes.
You're missing float, margin-right, and position on the other pages footer in element with class one-fourth from what I can tell. Seems like you forgot to load a stylesheet to me.
Edit:
Did some further review and it seems like you're missing the following styling for the class one-fourth in your footer:
position: relative;
float: left;
margin-right: 4%;
width: 22%;

wordpress woocommerce with wp touch the site is not coming mobile friendly and there is no image on carousal preview and next

I have 2 questions
how come does my css resets after using certain css code?
how come products other then on homepage is not showing in the middle on mobile
website url : (www.thevapeboys.co.uk)
I have a wordpress website with woocommerce installed I wanted to make mobile friendly so I installed a plugin called wptouch, I have added certain css values to it to make it more mobile friendly these are
these css script only triggers when someone from a mobile goes on the website
but the problem is I have carousal on the website which has next/preview and it dosent show the arrows for it so I tried adding this code to the css
.owl-nav .owl-next::before {
content: ">";
}
.owl-nav div::before {
content: "<";
}
I tried it with firebug and it looked all friendly but when i actually put the code in it resets all the other css values that i did before.is there a way it works without resetting the other css values because it works with firebug
when I go on shop the products and the font is coming on the left now i m not sure how to make them position all of them in the middle so it could be more mobile friendly.
Unfortunately the custom css file is first in line, which means it won't ever override anything. CSS works with a cascade meaning the last duplicate class wins out, according the browser. Put your custom css last and it will override.
You shouldn't need the WP Touch plugin as your theme is already responsive, in fact it's duplicating the mobile menu so I'd turn it off. https://woocommerce.com/storefront/ (search for the "Responsive" description box for proof of this)
Do the following to replace the icons, you need access to your custom javascript file: https://stackoverflow.com/questions/31605932/how-to-make-a-owl-carousel-with-arrows-instead-of-next-previous

Firefox is not rendering CSS background (Firefox error/bug?)

After spending a while creating an online portfolio, then uploading it, I noticed an issue with one of my sections. On the "Advertisement" section, I noticed it was not displaying the information, just the title. So, I kept on re-pushing the stylesheet.css, even editing it, and it would still look the same. The HTML, CSS, and JS is working how I wrote it. But it is just the section that is not showing. After browsing online and on stackoverflow for an answer, I believe it has to do with Firefox. When using Firebug, I noticed the section's background has been removed, causing the entire section to "disappear." It works just fine on Chrome. I'm not worried about IE, I know that browser has some issues in itself. Anyway, would anyone on here have an idea to resolve this issue, if I can? Or even, what could be causing this issue?
Here is my website to see for yourselves. www.voelkerdesigner.com
Cheers!
It is the opposite for me your entire site works in firefox for me but not in chrome, looking through your code, its being caused by your naming conventions. Namely #advertise
I use the adguard extension in chrome and below is the css it plugs into my html pages to hide ads, so im guessing your using an adblocker in firefox
#adsense_top, #adsensewide, #adspace, #adspace_top, #adspot-300x250-pos-1, #adspot-300x250-pos-2, #adswidget1-quick-adsense, #adswidget2-quick-adsense, #adtext, #adtop, #adv-masthead, #adv-top, #advert1, #advert2, #advertbox3, #advertise, #advertisement1, #advertisetop, #advertising-container, #advertising_wrapper {
display: none!important;
}
Might as well post a random answer on this... As i wont visit posted links by new users.. i'm just gonna guess that your background image might not be 100%...
In general i use background-image instead of background.. Short hand can be a little pain and breaks in some browsers if not perfect.
so i would compare against the following example
background-image:url('images/mybg.jpg');
background-image:url('http://somesite.com/images/mybg.jpg');
Basically alot of people do not use the url and just go straight for a file name or dont quote it.. And have seen that be the problem in the past, so do use the url('') method.
Otherwise if it still fails to work and you know the image is absolute, you would then have some other css that is either over riding your elements background or is preventing it from loading.
Another trick is using your console / inspect element to manually inject the background-image and see if that works... So once the page has loaded in chrome, inspect the element as normal.. And double click on your css property listing as you can add your own styles this way and if it fails, then its not the markup but something else.

CSS Background Images not loading

I've got a very strange bug in chrome recently that is when you load the page first time, or in incognito mode that none of the background images show.
when you then F5 the page, the background images all load in.
When you inspect the css it shows the image url in the css panel, however when you mouse over the url it doesn't display a tool tip with a preview of the image.
Neither when you check the downloaded resources are there even any mention of the background-images downloading.
you then refresh the page and it works fine, tool-tip of the css url even shows a preview.
The bug only randomly happens on first load occasionally, no way to guarantee to reproduce this.
Also its worth to note, it you untick then retick the background-image property on chrome it then downloads and displays the image.
I've got a piece of jquery that solves the issue but as you can see its hardly very elegant!
$('*').each(function(){
var bg = $(this).css('background-image');
$(this).css('background-image', 'none');
$(this).css('background-image', bg);
});
this happens on every instance of windows in multiple versions of chrome.
any ideas would be great! thankyou!
you might be able to see it happen on http://ensa.ac.uk
here is a video demonstration # http://youtu.be/oLTyhk5rXgE
Just to note.
The problem had been solved.
The issue was that the browser downloads all the css background images last. So if you refresh the page before its finished downloading the images, when the page loads again it loads from the cache. but because the images did not fully download they dont show correctly.
First of all, fix these:
backg1round-color: #c7dfe3;
backg1round-color: rgba(255,255,255,0.67);
If images is a subfolder then use
url('images/logo-bg2.jpg');
instead of
url('/images/logo-bg2.jpg');
in main.css
Try this instead. Not tested though;
$('*').each(function(){
var bg = $(this).css('background');
$(this).css('background', 'none');
$(this).css('background', bg);
});
And make relevant changes (ie, background-image to background) in your CSS also.
OR try;
$('*').each(function(){
var bg = $(this).css('background-image');
$(this).css('background-image', 'none');
$(this).css('background-image','url(bg)'); // or try url("bg") i am confused :P
});
From some search and research I came to a conclution;
The way I would tackle this is with classes. Have a separate CSS classes for each of the states, then simply use jQuery to change the class. This would ensure that all of the images are actually downloaded and available when you set the class -- which is where I think Chrome is failing (probably all WebKit browsers would do this)
Change css class as:
#nav
{
background-image: url(../images/logo-bg2.jpg);
height: 180px;
}
Owen,
I still see this problem on the application that I'm working on. I know this is also a hacky solution, but it's a little less hacky than the jquery solution that you had posted. I simply threw a version number based on time after the css include and it
e.g.
" rel="stylesheet" type="text/css" />
I know that this causes the css to never be cached, but I have not found any other solution.

stylesheet based on case sensitive url

I am out of options at this moment, since i do not have any idea why i have this behaviour. Working with Orchard CMS 1.4 and a custom superfish stylesheet. The behaviour is somehow differend based on how the site is accessed. Our customer has made a theme and it is as demo on a simple website at the following url.
https://assicuro.unit4demo.nl/acceptatie-1.0.1
If u browse to this url u see the menu with a image from https://assicuro.unit4demo.nl/acceptatie-1.0.1/themes/assicuro/content/images/nav-bg.jpg
This is the background of the menu when it is not hovered.
After browsing to the url, click the Home button and see the url being changed into
https://assicuro.unit4demo.nl/Acceptatie-1.0.1 (notice the capital A)
Is there anybody with some idea's how it is possible that the background image is not being showed? All tips are welcome!
It appears that the background-image is being overwritten by another CSS style:
//This is from "/Acceptatie-1.0.1/ (Line 51)"
#menu-24.sf-menu li.selected, #menu-24.sf-menu li.current {
background: #F1F1F1 !important;
}
This could also be based on the Layout files, if you are using URL Alternatives for the Layouts of different pages.
(If I remember correctly, Orchard CMS has issues dealing with URLs that contain certain characters, such as hyphens, which might be another issue to consider.)

Resources