How do i hide images and make font size responsive Topic is solved

General questions relating to Joomla! 3.x.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting.
Forum Post Assistant - If you are serious about wanting help, you should use this tool to help you post.
Post Reply
shaibustephen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 165
Joined: Sat Nov 17, 2018 1:52 pm

How do i hide images and make font size responsive

Post by shaibustephen » Tue Jun 18, 2019 2:06 pm

Please, how do i use css to hide all joomla image post in certain mobile devices size to reduce loading time? Also, how do i make text 'h1, p' in my carousel responsive? It seems to be too big and occupied large space on mobile phone wit small screen size. View the css below;



/*--------------------------------------------------------------
Corousel
--------------------------------------------------------------*/
#myCarousel .carousel-item .mask {
position: absolute;
top: 0;
left:0;
height:100%;
width: 100%;
background-attachment: fixed;
}
#myCarousel h4{
font-size:50px;
margin-bottom:15px;
color:#FFF;
line-height:100%;
letter-spacing:0.5px;
font-weight:600;
}
#myCarousel p{
font-size:18px;
margin-bottom:15px;
color:#161010;
}
#myCarousel .carousel-item a{background:#F47735; font-size:14px; color:#FFF; padding:13px 32px; display:inline-block; }
#myCarousel .carousel-item a:hover{background:#394fa2; text-decoration:none; }

#myCarousel .carousel-item h4{-webkit-animation-name:fadeInLeft; animation-name:fadeInLeft;}
#myCarousel .carousel-item p{-webkit-animation-name:slideInRight; animation-name:slideInRight;}
#myCarousel .carousel-item a{-webkit-animation-name:fadeInUp; animation-name:fadeInUp;}
#myCarousel .carousel-item .mask img{-webkit-animation-name:slideInRight; animation-name:slideInRight; display:block; height:auto; max-width:100%;}
#myCarousel h4, #myCarousel p, #myCarousel a, #myCarousel .carousel-item .mask img{-webkit-animation-duration: 1s;
animation-duration: 1.2s;
-webkit-animation-fill-mode: both;
animation-fill-mode: both;
}
#myCarousel .container {max-width: 1430px; }
#myCarousel .carousel-item{height:100%; min-height:414px; }
#myCarousel{position:relative; z-index:1; background: #ffc107 url(../) center center no-repeat; background-size:cover; }

.carousel-control-next, .carousel-control-prev{height:40px; width:40px; padding:12px; top:50%; bottom:auto; transform:translateY(-50%); background-color: #f47735; }


.carousel-item {
position: relative;
display: none;
-webkit-box-align: center;
-ms-flex-align: center;
align-items: center;
width: 100%;
transition: -webkit-transform .6s ease;
transition: transform .6s ease;
transition: transform .6s ease,-webkit-transform .6s ease;
-webkit-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-perspective: 1000px;
perspective: 1000px;
}
.carousel-fade .carousel-item {
opacity: 0;
-webkit-transition-duration: .6s;
transition-duration: .6s;
-webkit-transition-property: opacity;
transition-property: opacity
}
.carousel-fade .carousel-item-next.carousel-item-left, .carousel-fade .carousel-item-prev.carousel-item-right, .carousel-fade .carousel-item.active {
opacity: 1
}
.carousel-fade .carousel-item-left.active, .carousel-fade .carousel-item-right.active {
opacity: 0
}
.carousel-fade .carousel-item-left.active, .carousel-fade .carousel-item-next, .carousel-fade .carousel-item-prev, .carousel-fade .carousel-item-prev.active, .carousel-fade .carousel-item.active {
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0)
}
@supports (transform-style:preserve-3d) {
.carousel-fade .carousel-item-left.active, .carousel-fade .carousel-item-next, .carousel-fade .carousel-item-prev, .carousel-fade .carousel-item-prev.active, .carousel-fade .carousel-item.active {
-webkit-transform:translate3d(0, 0, 0);
transform:translate3d(0, 0, 0)
}
}
.carousel-fade .carousel-item-left.active, .carousel-fade .carousel-item-next, .carousel-fade .carousel-item-prev, .carousel-fade .carousel-item-prev.active, .carousel-fade .carousel-item.active {
-webkit-transform: translate3d(0,0,0);
transform: translate3d(0,0,0);
}



@-webkit-keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}

to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}

@keyframes fadeInLeft {
from {
opacity: 0;
-webkit-transform: translate3d(-100%, 0, 0);
transform: translate3d(-100%, 0, 0);
}

to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}

.fadeInLeft {
-webkit-animation-name: fadeInLeft;
animation-name: fadeInLeft;
}

@-webkit-keyframes fadeInUp {
from {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}

to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}

@keyframes fadeInUp {
from {
opacity: 0;
-webkit-transform: translate3d(0, 100%, 0);
transform: translate3d(0, 100%, 0);
}

to {
opacity: 1;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}

.fadeInUp {
-webkit-animation-name: fadeInUp;
animation-name: fadeInUp;
}

@-webkit-keyframes slideInRight {
from {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
visibility: visible;
}

to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}

@keyframes slideInRight {
from {
-webkit-transform: translate3d(100%, 0, 0);
transform: translate3d(100%, 0, 0);
visibility: visible;
}

to {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
}

.slideInRight {
-webkit-animation-name: slideInRight;
animation-name: slideInRight;
}

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26124
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: How do i hide images and make font size responsive

Post by Per Yngve Berg » Tue Jun 18, 2019 7:09 pm

Don't use px as font-size unit. Use em or rem which inherit.

https://j.eremy.net/confused-about-rem-and-em/

JessieHowell
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jun 19, 2019 10:04 am

Re: How do i hide images and make font size responsive

Post by JessieHowell » Wed Jun 19, 2019 10:22 am

Thanks alot for your opinion per yngve..
Solve my problem

shaibustephen
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 165
Joined: Sat Nov 17, 2018 1:52 pm

Re: How do i hide images and make font size responsive

Post by shaibustephen » Wed Jun 19, 2019 2:30 pm

Then, how do i hide image in some mobile device screen

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 26124
Joined: Mon Oct 27, 2008 9:27 pm
Location: Akershus, Norway

Re: How do i hide images and make font size responsive

Post by Per Yngve Berg » Wed Jun 19, 2019 6:09 pm

https://getbootstrap.com/2.3.2/scaffold ... responsive

Give the element a class "hidden-phone"


Post Reply

Return to “General Questions/New to Joomla! 3.x”