I
I
id_baton4eg2016-02-03 19:55:10
css
id_baton4eg, 2016-02-03 19:55:10

Header options on different pages?

The header is laid out on the bootstrap, it has several blocks and a large height, how to make it display them only on the main page? Something like

If not main { id\class
=display:none : \\hide some blocks,
id\class=height:200px ; \\ decrease height,
}

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
Cyber_bober, 2016-02-03
@id_baton4eg

Crutches:
1) add a second class to the header and on the main add

<style>
.class{
height:200px !important;
}
</style>

In the main style file, specify the header parameters for other pages
2) As in the example above, only without the pathname, add to the main js
$('.header').css('height', '200');

I
id_baton4eg, 2016-02-04
@id_baton4eg

if (window.location.pathname == '/')
doesn't work for some reason, I had to use the second crutch
$('.header').css('height', '200');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question