What's new

Help Sa mga master sa webdev diyan pahelp naman po, pano po ihide yung header logo sa isang specific na page

jonbinsdesu

Established
Joined
May 23, 2018
Posts
574
Reaction
115
Age
26
1651386809369.png

Eto po yung header ko ang balak ko po sana ay i hide yang logo pag nasa home siya na section kasi redundant po kasi siya tignan pero mag aappear sa ibang section when opening video, gameplay and so on ano po ba ang dapat kong isearch or baka po pwedeng makahingi ng sample
 

Attachments

d3nzky

Established
best way dyan lods is kung may specific class ka sa home. Ex.

HTML:
<body class="home">
    ....   
</body>

Then gamit ang css, i-hide mo sya pag nasa home.


CSS:
.home .logo {
    display: none;
}

.logo is yung class ng logo mo. make sure na yung .home is dynamically appearing lang specific sa homepage.
 

jonbinsdesu

Established
best way dyan lods is kung may specific class ka sa home. Ex.

HTML:
<body class="home">
    .... 
</body>

Then gamit ang css, i-hide mo sya pag nasa home.


CSS:
.home .logo {
    display: none;
}

.logo is yung class ng logo mo. make sure na yung .home is dynamically appearing lang specific sa homepage.
same lang din ba kung ganito yung code ko lods?
1651388165639.png
 

Attachments

jonbinsdesu

Established
CSS:
.home .logo-header {
    display: none;

[/QUOTE]
[QUOTE="d3nzky, post: 22860777, member: 1471621"]
}
ginawa ko po sinabi mo lods pag nasa home nasa header parin po yung logo hehehe
code ko sa header po
1651389103927.png

code ko sa home sir
1651388974154.png

yung sinabi mo sir
1651388919696.png
 

Attachments

Red-Eyed XaXa

Established
Anong framework yan? Pwede ata i-JavaScript yan. Kapag nag eexist yang Homepage banner, i-seset mo nalang opacity or display attribute.
 

d3nzky

Established
ginawa ko po sinabi mo lods pag nasa home nasa header parin po yung logo hehehe
code ko sa header po
View attachment 1921482
code ko sa home sir
View attachment 1921481
yung sinabi mo sir
View attachment 1921480
Hindi
Code:
.about-section .logo-header
lods.

Yung source code mo pang homepage (index.html o index.php), maglagay ka ng CLASS na home sa body tag. Ex:

HTML:
<body class="home">
    ....
</body>

Then, select mo yung logo sa CSS. ex:

CSS:
.home .logo-header {
    display: none;
}

Easy lang yan lods, di mo need ng programming dyan like Javascript. Kung di mo ma fix, PM mo sakin yung development URL mo, 5mins tapos yan yan. hehe
 

eugxx

Forum Veteran
Gawan mo lang ng condition sa JavaScript yan. Kapag nasa Top section nung Homepage lang siya mag eexist.
Pwede mo search to, Same logic lang: "show/hide div on scroll position javascript".
Yan din naisip ko. Kung gagamitan sya ng angular madali lang. Pwede kasi dun sa condition nya pag nasa route sya ng homepage maghihide yung top section.
 
Top