Jump to content

Recommended Posts

@nsf43

Did you apply the !important declaration to your CSS changes?

M

Edited by ArtcoInc

Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
27 minutes ago, nsf43 said:

but I don't know why that is a requirement.

It is required when using user.css to overide boostrap default styling.


 

Share this post


Link to post
Share on other sites
7 hours ago, JcMagpie said:

It is required when using user.css to overide boostrap default styling.

...or more precisely, when the stylesheets are in the right order and user.css comes last, it is required to override some styling if it is marked important in bootstrap

8 hours ago, nsf43 said:

yes, but I have never known that to be a requirement, unless Phoenix requires it.

The situation with the stylesheets in the wrong order for some people has been confusing; when it's like that you need to mark things important in user.css to get them to override bootstrap styles coming afterwards, and if bootstrap marks those style definitions important it does nothing.

I feel your frustration! The developer tools in your browser are really useful for checking where style definitions are coming from but it is much easier to attach new styles to the specific element you're looking at than it is to simulate adding them to user.css. In the normal run of things this doesn't matter much but in this situation it just adds to the angst.

The fix was to includes/classes/hooks.php so make sure you got the new version of that file.


For a new install or if your store isn't mobile-friendly, get the community-supported responsive osCommerce (Phoenix).

here: on the official osc download page

Working on generalising bespoke solutions for Quickbooks integration, Easify integration and pay4later (DEKO) integration at 2.3.x

Share this post


Link to post
Share on other sites
1 hour ago, BrockleyJohn said:

or more precisely

😊 was about 11.30 and thinking other things but yes it is more precise. Intresting to see what mozilla.org (Firefox) have to say about its use!

https://developer.mozilla.org/en-US/docs/Web/CSS/Specifiacity

 

How !important can be used:

A) Overriding inline styles

Your global CSS file that sets visual aspects of your site globally may be overwritten by inline styles defined directly on individual elements. Both inline styles and !important are considered very bad practice, but sometimes you need the latter to override the former.

In this case, you could set certain styles in your global CSS file as !important, thus overriding inline styles set directly on elements.

<div class="foo" style="color: red;">What color am I?</div>

.foo[style*="color: red"] { 
  color: firebrick !important;
}

 


 

Share this post


Link to post
Share on other sites
11 hours ago, nsf43 said:

Where is John's solution to the user.css problem, I am anxiously awaiting that solution! I've been messing with this for 3 days....

Hi Nancy,

Here it is. Replace your includes / classes / hooks.php file with this one: https://github.com/gburton/CE-Phoenix/blob/master/includes/classes/hooks.php

Peter


PROUDLY PASSIONATE PHOENIX SUPPORTER

Full-time I am a C-suite executive of a large retail company in Australia. In my spare time, I enjoying learning about web-design.

Download the latest version of CE Phoenix from gitHub here

Join the Phoenix Club. Become a Phoenix Supporter.  Gain access to special codes and modules and help the project thrive. Read here

 

Share this post


Link to post
Share on other sites

@nsf43 subscribe [follow] the announcements thread as fixes and updates are published there for those not familiar with Github.


This is a signature that appears on all my posts.  
IF YOU MAKE A POST REQUESTING HELP...please state the exact version
of osCommerce that you are using. THANKS

 
Get the latest Responsive osCommerce CE (community edition) here

Share this post


Link to post
Share on other sites

Thanks for explaining! I have a hard time remembering something that makes no sense.  And I admit this is my first foray into OpenSource.  All my stuff has been home-grown, so I am learning as I go.

So, now I have the new "hooks.php" and I still have the same old page with blue text and nothing showing on the right. I'm only on my first cup of coffee - perhaps magic will happen. :)

Share this post


Link to post
Share on other sites
On 8/28/2019 at 4:17 PM, 14steve14 said:

Gary nothing changes still. When I inspect the element in either firefox or Chrome browsers and manually change any of the settings the styles change, but not when changing the user.css file. I have tried clearing browsers and even tried on a different computer.

Strange on this is.

 

Are you using "headertags_seo_styles.css" from "HeaderTags SEO" contribution ?
If yes, make the changes into this file instead "user.css" file.


Osc v2.3.4 BS "custom"
PHP 7.3 compatible (710 modified files => o_O')

Share this post


Link to post
Share on other sites
17 hours ago, nsf43 said:

Did the new "hooks.php" solve the "css" issues for others?

yes by my it did

Share this post


Link to post
Share on other sites

@nsf43

Your user.css file has a lot of non-css stuff in it! I realize you are testing things, but putting HTML and php code in there won't work.

Also, what modules do you have turned on in your NavBar and Header?

M


Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites

In my defence - I stuck "suggestions" in user.css so I would remember what I was trying, even when it was php.  I have removed the extraneous.

Account, Brand, Hamburger, Home, New Products and shopping Cart.  I have never seen the Hamburger

Nothing appears on the right, so I have tried putting everything on the left....

 

Share this post


Link to post
Share on other sites

Your code is broken if you look carfully using browser inspection tool you will se your navbar is not correct so you must have made changes or have a broken install. You can see the item marked in red these show your code is broken.

 

image.thumb.png.09858a08f3a49e9e1fe625110c6bad71.png


 

Share this post


Link to post
Share on other sites

Thanks, Magpie - I did want to put my Logo in the brand field - but since that didn't work either, I pulled out that code. Clearly, I erred.  Thought I did it right, but will fix shortly. 

Thanks again!! My fingers are crossed!

 

Share this post


Link to post
Share on other sites

My advice for what it's worth, start again with clean stock install. Make no changes and get stock working first. Then and only then when you know stock is working correctly

1) do a backup yes do a backup, as then if you mess up you can just do a restore.

2) The do the changes you need one at a time checking each works before moving onto the next. If your not sure ask.


 

Share this post


Link to post
Share on other sites

Sadly, that is how I always do things, and I've been doing this a longgg time.  But from the beginning, I could not even make one tiny change that worked.  And I NEVER make more than one change at a time. But I fear I got caught up trying all the changes people were suggesting. 

So I am going back to my original. Thanks. Hope I don't have to bother again,

Share this post


Link to post
Share on other sites

I have backed up previous code, backed up my DB and did a new upload of code.  I ran the Install and did nothing else. 

Added to "user.css" for the text in the navbar to be italic, and the background color to be red.

I also verified that "user.css" is the last stylesheet to be loaded.

Nothing changed.

Share this post


Link to post
Share on other sites

@nsf43

I see the italic text. The background color you have specified is 100% green, and 40% blue, *not* red. I see *part* of the background color has changed. Try adding the !important to your user.css background color declaration.

Oh, and clear the cache in your browser.

M

Edited by ArtcoInc

Get the latest Responsive osCommerce CE (community edition) here .

Share this post


Link to post
Share on other sites
29 minutes ago, nsf43 said:

I have backed up previous code, backed up my DB and did a new upload of code.  I ran the Install and did nothing else. 

Added to "user.css" for the text in the navbar to be italic, and the background color to be red.

I also verified that "user.css" is the last stylesheet to be loaded.

Nothing changed.

/* user.css ----------------------------------------------------------------- */

.navbar,
.navbar-brand,
.nb-brand,
.cm-navbar
{ 
	font-style:italic !important;
	background-color:red;
}

or for the entire navbar to be red:

/* user.css ----------------------------------------------------------------- */

.navbar,
.navbar-brand,
.nb-brand,
.cm-navbar
{ 
	font-style:italic;
	background-color:red !important;
}

 

Edited by Smoky Barnable

The water in a vessel is sparkling; the water in the sea is dark. The small truth has words which are clear; the great truth has great silence.

- Rabindranath Tagore

Share this post


Link to post
Share on other sites

added !important and cleared cache with clearstatcache(clear_realpath_cache);

You see italic text??  and some color change?? what browser?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×