Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Choosing when to display an object 1

Status
Not open for further replies.
Mar 23, 2015
37
0
0
US
I need to move a page column's content over one without putting anything in it's place. I thought it may be simple(ish) to put an invisible object in that spot pushing the visible column over. The issue changes when mobile browsing and there is a huge blank spot between content. Is there a simple(ish) way to use the object when the browser is desktop sized, but not use it when it's mobile sized? Maybe I'm just over thinking the issue too?

Thanks
 
There is a property in CSS called display. You can set it to none to remove things from the layout, and they will take up no room.

So if you are using media queries to target the mobile devices you can do something like:

Code:
@media screen and (max-width:750px)
{
[indent]#object (or even div.classname)
{
[indent]display:none;[/indent]
}
[/indent]
}

This will hide the object for all resolutions lower than 750px;

----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Web & Tech
 
Hmmm... I did not see Phil's post when I started typing.

^ what he said [bigsmile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top