Search Results for 'css'

Results from the Forum
Stephanieb
Participant
#0

Hi,

I am trying to add some custom css to my homepage via the option in the visual composer – so that it applies it just for that page.

I tested some custom css earlier which worked fine but it now will not delete or update. I put the code in and there are no errors but when I press save nothing happens. If I click close and then update and go back in the code I put in is gone and the old code I used earlier to test with is back.

http://www.totsintow.co.za

Thanks 🙂

dl_rod
tagDiv Member

Hello Lucian,

Sorry but once more I’m not explaining myself properly. If you check this post out you will be able to see at the end of each paragraph a comment bubble. When I use text padding in an article those bubbles are not showing up like in this post .

I asked the guys at livefyre adn their response was: “it appears Sidenotes is working just fine on that site as far as we can see. As I suspected, it looks to be an issue with your styling. The engineer I spoke with suggested you try adjusting your DOM selectors for full-width pages and fixing the CSS that is drawing a border around our editor textarea.”

Is there a way we can fix the styling in the theme so sidenotes can work well when padding for the text is used?

Kind regards,

Daniel

simchris
tagDiv Member

COPYING THIS FROM OTHER THREAD FOR THOSE WHO HAVE ASKED ME COUPLE OF TIMES ABOUT REMOVING GOOGLE FONTS FROM FUNCTIONS.php … ref: Newspaper 4.2/4.2.2 — not tested with 4.3, but presumably same idea:

————copied from other thread ————–

Hi,
okay I think in 4.2 here is what my edited functions.php looks like
lines 38 -> 59

/*  ----------------------------------------------------------------------------
    CSS - front end
 */

function td_load_css() {

    //google fonts
    if ((defined('TD_DEPLOY_MODE') and (TD_DEPLOY_MODE == 'demo' /*or TD_DEPLOY_MODE == 'dev' */)) or defined('TD_SPEED_BOOSTER')) { //on demo and dev we load only the latin fonts
        //modify this collection if you want to optimize the fonts loaded
        //collection url -> : http://www.google.com/fonts#ReviewPlace:refine/Collection:PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700
        //wp_enqueue_style('google-font-rest', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700'); //used on menus/small text
    }

    //add the google style link for fonts used by user
    $td_fonts_css_files = td_util::get_option('td_fonts_css_files');
    if(!empty($td_fonts_css_files)) {
        wp_enqueue_style('google-fonts-style', td_global::$http_or_https . $td_fonts_css_files);
    }

    //bootstrap - custom built - it was generated via compilation of /external/bootstrap-master/less/bootstrap.less

You will note I didn’t remove 44-49, I commented it out with //

I did not remove the code which is there *if* somebody selects fonts from the admin panel, which I think is what you were doing; and then it would crash.

And I DELETED this

        $td_user_fonts_list = array();
        $td_user_fonts_db = td_util::get_option('td_fonts');
        if(!empty($td_user_fonts_db)) {
            foreach($td_user_fonts_db as $td_font_setting_key => $td_font_setting_val) {
                if(!empty($td_font_setting_val) and !empty($td_font_setting_val['font_family'])) {
                    $td_user_fonts_list[] = $td_font_setting_val['font_family'];
                }
            }
        }

        if(!in_array('g_438', $td_user_fonts_list)) {//'g_438', //Open Sans
            wp_enqueue_style('google-font-opensans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on menus/small text
        }

        if(!in_array('g_617', $td_user_fonts_list)) {//'g_617', //Ubuntu
            wp_enqueue_style('google-font-ubuntu', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic'); //used on content
        }

        if(!in_array('g_453', $td_user_fonts_list)) {//'g_453', //PT Sans
            wp_enqueue_style('google-font-pt-sans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic&subset=latin,cyrillic-ext,latin-ext,cyrillic'); //used on content
        }

        if(!in_array('g_445', $td_user_fonts_list)) {//'g_445', //Oswald
            wp_enqueue_style('google-font-oswald', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Oswald:400,300,700&subset=latin,latin-ext'); //used on content
        }

        if(!in_array('g_521', $td_user_fonts_list)) {//'g_521', //Roboto
            wp_enqueue_style('google-roboto-cond', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on content
        }

        if(!in_array('g_639', $td_user_fonts_list)) {//'g_639', //Vollkorn
            wp_enqueue_style('google-vollkorn', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700'); //used on quoates classic
        }
    }

simchris
tagDiv Member

Hi,
okay I think in 4.2 here is what my edited functions.php looks like
lines 38 -> 59

/*  ----------------------------------------------------------------------------
    CSS - front end
 */

function td_load_css() {

    //google fonts
    if ((defined('TD_DEPLOY_MODE') and (TD_DEPLOY_MODE == 'demo' /*or TD_DEPLOY_MODE == 'dev' */)) or defined('TD_SPEED_BOOSTER')) { //on demo and dev we load only the latin fonts
        //modify this collection if you want to optimize the fonts loaded
        //collection url -> : http://www.google.com/fonts#ReviewPlace:refine/Collection:PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700
        //wp_enqueue_style('google-font-rest', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700'); //used on menus/small text
    }

    //add the google style link for fonts used by user
    $td_fonts_css_files = td_util::get_option('td_fonts_css_files');
    if(!empty($td_fonts_css_files)) {
        wp_enqueue_style('google-fonts-style', td_global::$http_or_https . $td_fonts_css_files);
    }

    //bootstrap - custom built - it was generated via compilation of /external/bootstrap-master/less/bootstrap.less

You will note I didn’t remove 44-49, I commented it out with //

I did not remove the code which is there *if* somebody selects fonts from the admin panel, which I think is what you were doing; and then it would crash.

And I DELETED this

        $td_user_fonts_list = array();
        $td_user_fonts_db = td_util::get_option('td_fonts');
        if(!empty($td_user_fonts_db)) {
            foreach($td_user_fonts_db as $td_font_setting_key => $td_font_setting_val) {
                if(!empty($td_font_setting_val) and !empty($td_font_setting_val['font_family'])) {
                    $td_user_fonts_list[] = $td_font_setting_val['font_family'];
                }
            }
        }

        if(!in_array('g_438', $td_user_fonts_list)) {//'g_438', //Open Sans
            wp_enqueue_style('google-font-opensans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on menus/small text
        }

        if(!in_array('g_617', $td_user_fonts_list)) {//'g_617', //Ubuntu
            wp_enqueue_style('google-font-ubuntu', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic'); //used on content
        }

        if(!in_array('g_453', $td_user_fonts_list)) {//'g_453', //PT Sans
            wp_enqueue_style('google-font-pt-sans', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic&subset=latin,cyrillic-ext,latin-ext,cyrillic'); //used on content
        }

        if(!in_array('g_445', $td_user_fonts_list)) {//'g_445', //Oswald
            wp_enqueue_style('google-font-oswald', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Oswald:400,300,700&subset=latin,latin-ext'); //used on content
        }

        if(!in_array('g_521', $td_user_fonts_list)) {//'g_521', //Roboto
            wp_enqueue_style('google-roboto-cond', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic'); //used on content
        }

        if(!in_array('g_639', $td_user_fonts_list)) {//'g_639', //Vollkorn
            wp_enqueue_style('google-vollkorn', td_global::$http_or_https . '://fonts.googleapis.com/css?family=Vollkorn:400italic,700italic,400,700'); //used on quoates classic
        }
    }

  • This reply was modified 11 years by simchris.
simchris
tagDiv Member

@OuweAap
4.2.2 works awesomely on our sites with no issues impacting the sites …. couple of minor CSS changes we did, but that’s common to any customization. Nothing really disastrous or ultra painful in 4.2.2.

Ljubisa B.
tagDiv Member

Thank you Steven !

Steven
tagDiv Member

@Ljubisa B. i’m glad my tips work for you,those are great #’s

robert-r
tagDiv Member

Hello Lucian.

I can use Header 3 for this code for background image.

How to move logo from center to the left like in Header 1 by CSS?

Ljubisa B.
tagDiv Member

Hello, thanks for great Posting hir, with you suport have great Google speedtest result. THX again.

http://awesomescreenshot.com/0173jn0ce2
and
http://awesomescreenshot.com/0113jn1l63

robert-r
tagDiv Member

Hello Lucian,

I pasted code in custom CSS and is not working.
This code is working fine with Header 3 and not working with Header 1 which I’m using.

.td-boxed-layout .td-logo-rec-wrap, .td-boxed-layout .td-affix .td-logo-rec-wrap, .td-full-logo {
background: url(‘https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcS1snmw3W4bY_-Lpbd_am2QprWg5D5H10CR0IQOZa9AsHV6z3h1iw’) !important;
}

Lucian
tagDiv Staff

Hi,

Have you tried adding the blockquotes using this shortcodes: http://screencast.com/t/AnwvWMYYLXG I’m not sure how you would want the blockquotes to appear.
You could use css to align the left the text and if you use child theme and don’t want to use custom css field from theme panel you can edit the style.css file and add it there.

Thanks

Lucian
tagDiv Staff

Hi,

You can replace the bullets via custom css using a css like this:

ul li {
list-style-image: url('sqpurple.gif');
}

Hope this helps!
Thanks

maxishere
Participant
#0

Hello,

How can I make the text on blockquotes align to the left, rather than centre please?

I am using a Newspaper as a child theme, and would rather not use the ‘Custom CSS’ option in the Theme Panel (which I haven’t been able to get working with this anyway!) as that renders the CSS after the page load.

Many thanks.

Max

Lucian
tagDiv Staff

Hi,

Use this css: http://screencast.com/t/O0FE9AHFMkyk

.mfp-arrow {
font-family: newspaper !important;
}

Thanks

Lucian
tagDiv Staff

Hi,

Use this css: http://screencast.com/t/54IIsRY8x

.td_mod_aj_search .item-details a {
white-space: normal !important;
}

Thanks

Lucian
tagDiv Staff

Hi,

Use this css: http://screencast.com/t/lfFeU6e2gjqM

@media (max-width: 767px){
.header-logo-wrap, .header-logo-wrap img {
display: inline !important ;
}
}

Thanks

Fudoki
tagDiv Member

As always, Thanks Chris. I can’t find any post that refers to the specific lines to delete (in 4.2x).

What I’m wondering is what lines we need to delete from functions.php?

I get a WSOD if I delete 48-49:

wp_enqueue_style('google-font-rest', td_global::$http_or_https . '://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic|Ubuntu:400,400italic|Open+Sans:400italic,400|Oswald:400,700|Roboto+Condensed:400italic,700italic,400,700'); //used on menus/small text

Maybe this is because the speed booster is also calling Google font scripts now?

Thanks!

Lucian
tagDiv Staff

Hi,

Unfortunately that would be the beast way, you can’t build a different menu for mobile only.
If you inspect the menu items you will noticed that each has a unique class, like “menu-item-4630” in this case, so you will need to use that class to hide the menu item which you don’t want to show up on desktop/tablets screen, then another css to hide the menu item you show on desktop and tables on mobile, below you have some screenshots which will make you understand this better:

* http://screencast.com/t/giGXF0RF
* http://screencast.com/t/iSEqUzAbFsVc
* http://screencast.com/t/Suboukyr8z
* http://screencast.com/t/vRvCuGd497M

You could also build the top menu as you like, the top menu it’s hidden on mobiles but you could customize it then hide it on desktop and use it on mobile.
Here you have the css I used for the example:

@media (min-width: 767px) {
.menu-item-4630 {
display: none;
}
}

@media (max-width: 767px) {
.menu-item-2962 {
display: none;
}
}

Thanks

  • This reply was modified 11 years by Lucian.
Lucian
tagDiv Staff

Hi,

That may happen due to the css that it’s loading later. You could try to edit the style.css file and add the background for your site from there.

Thanks

Lucian
tagDiv Staff

Hi,

Please use this css and add it in theme panel > custom css:

@media (max-width: 767px){
.single_template_4 .td-image-gradient:before {
bottom: 0px;
}
.td-big-slide-background, body.single_template_4 #td-full-screen-header-image, .backstretch {
height: 500px !important;
}
}

Should solve your issue: http://screencast.com/t/73be90lxvS

Thanks

simchris
tagDiv Member

We had good luck with Amazon’s CDN; but in our case we have a very powerful brand new web server, dedicated switch in class A datacenter, so we’re finding a “balance” of what to use the CDN for. In our case, in process of migrating everything to https/SSL so right now we’re loading everything locally.

Obviously, for any website, it’s very much a trial and error process. 🙂

Steven
tagDiv Member

very nice…

mehedi
tagDiv Member

Its roboto condensed with font-weight:300

Steven
tagDiv Member

@mehedi that look really nice,it don’t even look newspaper theme any more…what font you using for the names in the menu…

mehedi
tagDiv Member

Yep. Header Style 8 literally changed the look of my website and it looks awesome. Although there was some bugs 😉

Viewing 25 results - 31,276 through 31,300 (of 33,436 total)