PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Mon Jun 18, 2018 2:22 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Aug 25, 2016 5:55 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4417
Location: United Kingdom
Syntax: [ Download ] [ Hide ]
<div class='home-column mobile'>
<div class='home-column-inner'>
<div class='home-column-image'><img src='/images/head-contact.jpg' alt='contact '/></div></div>
</div>


So this DIV needs to show on all PCs and tablets.
But on mobile, I want it to disappear.

I thought if I added the " mobile", and then in the CSS for mobile widths, I added:
Syntax: [ Download ] [ Hide ]
<style>
.home-column mobile
{
display: none;
}
</style>


It would do it. But it doesn't.

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 6:35 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6424
Location: Montreal, Canada
Set a display none in your media query?

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 6:56 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4417
Location: United Kingdom
Is that not what I have done in my CSS? It's not picking it up. I Assume I have done it right then?

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 7:26 am 
Offline
Moderator
User avatar

Joined: Tue Nov 09, 2010 3:39 pm
Posts: 6424
Location: Montreal, Canada
You need to replace that space with a dot. I had missed that. You're targeting an element that has both classes. The way you have it written would hide a mobile element that is a child of an element of class home-column

Syntax: [ Download ] [ Hide ]
.home-column.mobile {
  display: none;
}

_________________
Supported PHP versions No longer supported versions


Top
 Profile  
 
PostPosted: Thu Aug 25, 2016 7:36 am 
Offline
DevNet Master

Joined: Wed Oct 08, 2008 3:39 pm
Posts: 4417
Location: United Kingdom
Now I've learnt something! Thanks. :)

_________________
Love PHP. Love CSS. Love learning new tricks too.
All the best from the United Kingdom.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group