Tagged: yigit
-
AuthorPosts
-
February 9, 2016 at 10:28 am #580249
Hello,
I’ve noticed a problem with my enfold site that utilize the Icon content element. It looks great on desktop browsing. However, it is disproportionate on a mobile device. MUCH TOO LARGE for a mobile site. The icons stay nearly the same size as the desktop site and the icons change to a vertical list.
1. I would like the icons to be listed horizontally and much smaller in size. I have marked the area in a red box to show the desired section size. The icons should fit nicely within that box. See screenshot.
2. I would like CSS that can be used on all Enfold sites with this content element. They will range from 3 to 6 icons and I would like to be able to adjust the size of the icons AND the content area. Ideally the icons should size dynamically one the content are has been set. Site 1: has 3 icon content elements. Site 2: has 5 icon content elements. I have several more sites.
I only want this to affect the mobile site only. The desktop site is perfect.
Thanks for your help,
Jas
February 11, 2016 at 7:33 am #581460Hi Jasmer!
Thank you for using Enfold.
1.) Adjust the width of the columns that contain the icons:
@media only screen and (max-width: 767px) { #top #wrap_all #photo-center .flex_column.av_one_third { width: 31%; float: left; clear: none; margin-left: 2%; } }
2.) Please refer to number 1. Use the google / chrome inspector in order to get the appropriate element selectors. https://developer.chrome.com/devtools/docs/dom-and-styles
I only want this to affect the mobile site only. The desktop site is perfect.
3.) Use css media queries. http://www.w3schools.com/cssref/css3_pr_mediaquery.asp
Regards,
IsmaelFebruary 11, 2016 at 9:00 am #581495Hi Ismael,
Thank you for that info. Ok lets limit this discussion to Site 1 listed above, for now.
I added a height: 110px!important; to the CSS. This was to center the icons.
@media only screen and (max-width: 767px) { #top #wrap_all #photo-center .flex_column.av_one_third { width: 31%; height: 110px!important; float: left; clear: none; margin-left: 1%; } } /*Content Element: Icon*/
There are a few problems:
1a. Portrait orientation – The section is still to tall. It is much larger than the slider > which should be the focus of the page.
1b. Landscape orientation – Perfectly proportional.
Is this difficult to change one without affecting the other? I would be ok if the landscape view section was smaller. That is ok.2. The icons are text are too large. They don’t look like they are proportional to a mobile site. Will you add some CSS to the above to shrink the icons and text? Perhaps this will help the section height problem.
3. The background image needs to move left. I used this CSS some months ago and now it seems to have no effect now?? It’s not working.
@media only screen and (max-width: 767px) { #photo-center .av-parallax.avia-full-stretch.active-parallax { background-position: 35%!important; }}
Thanks for your help!
Jas
February 15, 2016 at 4:56 pm #583573Hey!
would be best for the forum to stick with one question/issue only and open a new ticket for more.
Basically you need to work with media queries: https://css-tricks.com/snippets/css/media-queries-for-standard-devices/
So for your icons in portrait mode use this code:
@media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation: portrait) { a.av-icon-char { font-size: 20px !important; width: 20px !important; height: 20px !important; line-height: 20px !important; }}
and adjust as needed.
Regards,
AndyFebruary 16, 2016 at 2:06 am #583850Thank you Andy! I’ll check out that article.
Almost perfect.
Look at the first screenshot. The section is too large in portrait mode but it is good for landscape mode. What are you recommendations? That section should not be twice the height of the image slider at the top of the page. The image slider is the focus, the header, not this section.
I like this element but I’d like to find a solution for all my sites. I’d like to continue to use it.
Thanks!
February 17, 2016 at 1:27 pm #584687Hey!
my recommendation is as already said: you need to work with media queries. I already provided you a code for portrait mode. Adjust it as needed. You might need to code one by yourself for landscape mode, refer to the link I have provided you. Basically you just need to adjust min-width and max-width values of the media queries.
Cheers!
AndyFebruary 18, 2016 at 2:31 pm #585407I don’t think I am explaining myself correctly. ALL of the CSS below, no matter what I adjust, only adjusts the size and position of the icons. I have attempted to adjust the 20px and 85px values.
I want to make the color section shorter. I need CSS to adjust the height of the background color section that the icons are laying on top of.
The icons are perfect. The background that the icons lay on top of are not.
This is what I have currently…
@media only screen and (max-width: 767px) { #top #wrap_all #photo-center .flex_column.av_one_third { width: 31%; height: 85px!important; float: left; clear: none; margin-left: 1%; }} /*content element: icon*/ @media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation: portrait) { a.av-icon-char { font-size: 20px !important; width: 20px !important; height: 20px !important; line-height: 20px !important; }} /*icon content element size*/
February 18, 2016 at 3:02 pm #585425Hi!
does not really help us to post any code. Instead use screenshots and a precise link where we can inspect the elements in question. Show us in a mockup the result you want to achieve and try our best to assist you in finding a solution.
Cheers!
AndyFebruary 18, 2016 at 3:27 pm #585438Sorry the precise link is above. Site #1 in Private Content
#post-580249The screenshot is also above here. #1a in Private Content
#post-583850Thank you
February 18, 2016 at 3:41 pm #585442Hi!
I checked your site on mobile and it looks good to me. The theme seems to work fine. However, I opened https://dl.dropboxusercontent.com/u/1049926/Photo%20Feb%2008%2C%206%2037%2025%20PM.png but have no idea what you want to say us with those different arrows and two times “same size”. Please use a mockup showing exactly the results you want to achieve.
Regards,
AndyFebruary 18, 2016 at 4:12 pm #585467Andy,
See screenshot below:
The request is this: I want to adjust the height on the red box which is a color section background. None of the CSS above does this.1. On several posts you’re telling me my problems seem to look ok to you. But they don’t look ok to me which is why I am posting a topic.
2. You’re telling me to post links that are already here in this post.
3. You’re telling me to post screenshots that are already here in this post.
This is happening in post after post. and if you look at my other topics I’ve never had this much trouble with any other rep. I don’t know why to say or do here. I think you and I just don’t work well together. When I am working with other reps I don’t have this problem.
Thank you for your help but this is taking 4 times as long as normal. Please just forward my posts to other reps. I’d appreciate it.
Jas
February 18, 2016 at 4:28 pm #585482Hi!
you are using this code:
1.)@media only screen and (max-width: 767px) { #photo-center .av-parallax .av-parallax-inner { height: 320px !important; }}
so replace it with a different value, something smaller like:
@media only screen and (max-width: 767px) { #photo-center .av-parallax .av-parallax-inner { height: 200px !important; }}
2.+3.) No, links and screenshots are not in your post. They are only in the beginning of this THREAD, which is quite annoying when we need to scroll above and search for the right post where we can find the specific data. So please include them in every post of you where it makes sense, so we can easily access it and know exactly which link and screenshot you are referring to.
By the way be aware that you already posted a lot in this forum and for any further customization of the theme please contact codeable: http://kriesi.at/contact/customization
Best regards,
AndyFebruary 18, 2016 at 4:36 pm #585485This does not work. It only makes the photo shorter.
As you can see the background stays large.
So to be clear. The color section is not height adjusting with this CSS
I’d be happy to stop posting on this topic but the CSS you are giving me isn’t working
doesn’t work
@media only screen and (max-width: 767px) { #photo-center .av-parallax .av-parallax-inner { height: 200px !important; }}
Thank you,
Jas
February 19, 2016 at 12:37 pm #585983Hi!
I think the code does work fine, but it just does not do the kind of customization you are asking for.
You can easily change color section’s height by editing it in ALB and choosing “custom pixel” in “Section Minimum Height”.
Best regards,
AndyFebruary 19, 2016 at 12:43 pm #585987Thanks. You are correct Andy. That is not what I am asking for. It just makes the site look broken. So..
1. I ONLY want to edit the color section height for mobile, as we have discussed at length in this topic.
2. If I adjust the size in the color section it will change the size on the desktop site which I did not want to do.
I’ve changed the CSS back to 320px. Do you know CSS that will work for the specific question I am asking for?
I’m 99% there.
Thanks,
Jas
- This reply was modified 8 years, 10 months ago by Jasmer.
February 19, 2016 at 1:24 pm #586025Hey!
a link in your last post would have been awesome …
Try this code:
@media only screen and (max-width: 767px) { .avia-section { height: 258px; }}
Cheers!
AndyFebruary 19, 2016 at 1:41 pm #586037This is almost perfect. I only need to center the icons now.
The problem is I cannot bring the icons up to the center no matter what px I put in here.. I started with 85px and went up to 485px. If I put in 1485px it doesn’t make any difference.
@media only screen and (max-width: 767px) { #top #wrap_all #photo-center .flex_column.av_one_third { width: 31%; height: 485px!important; float: left; clear: none; margin-left: 1%; }} /*content element: icon*/
February 19, 2016 at 3:08 pm #586085Hey!
final customization my friend:
span.av_font_icon.avia_animate_when_visible.av-icon-style-border.av-no-color.avia-icon-pos-center.avia_start_animation.avia_start_delayed_animation { position: relative; top: -57px; }
For further customization hire a freelance developer: http://kriesi.at/contact/customization
However, I recommend to learn some CSS coding …Cheers!
AndyFebruary 19, 2016 at 3:36 pm #586125Andy,
This CSS has no effect. I changed the value and added !important. Still no effect. If you can’t do it, then I definitely am not going to be able to learn CSS and make this work anytime soon.
A couple of times other support reps have asked me for my login credentials. That has been helpful in solving difficult problems. Perhaps you can take a look.
We have come this far. And we are one icon move from finishing. This is going to solve all of my other website problems. I use this element on all of my sites and I am 99% of the way to a solution.
Thank you,
Jas
February 22, 2016 at 2:06 pm #587109Hey!
of course you need to include media queries into my code if you want it for mobile only. I put this code into your Quick CSS field:
@media only screen and (max-width: 767px) { span.av_font_icon.avia_animate_when_visible.av-icon-style-border.av-no-color.avia-icon-pos-center.avia_start_animation.avia_start_delayed_animation { position: relative; top: -57px; }}
and now it’s working as expected. Can you confirm please?
Cheers!
AndyFebruary 22, 2016 at 2:32 pm #587137Thank you Andy,
It works. I have one question..
I like to have my CSS organized. So, I moved your CSS from the bottom of Quick CSS, to near the top of the Quick CSS.
When I put it at the top, it does not work.
When I put it back at the bottom it works.I am cut and pasting and not changing anything as I have done many times. I’ve tried this several times with the same result.
Why does it matter where I put the CSS in the Quick CSS area? I need to know this for when I use it for my other sites. Should I try rearranging and moving it to the Child Theme CSS?
Thanks again,
Jas
February 22, 2016 at 2:36 pm #587141Hey!
feel free to google about CSS coding or general CSS questions and feel free to ask in this forum theme related questions only.
Yes, you can move the code to your child theme. I will close this thread now. Feel free to open a new one if you need some more assistant related to our themes.
Regards,
AndyFebruary 22, 2016 at 2:39 pm #587143Hi Jas
You had errors in your custom CSS such as this one – http://i.imgur.com/rihdXD6.png. I fixed them and updated your theme options. You can find fixed version below in case you need it
Cheers!
YigitFebruary 25, 2016 at 7:50 pm #589410Hey!
I added following code to the bottom of Quick CSS field
@media only screen and (max-width: 480px) { #photo-center a.av-icon-char { width: 15px!important; height: 15px!important; line-height: 15px!important; } #photo-center a.av-icon-char:before { left: -10px; position: relative; } #photo-center .av_icon_caption { font-size: 13px; }}
And confirmed that it does work fine on my iphone 5s. Screenshot in private content field
Best regards,
YigitFebruary 26, 2016 at 10:18 am #589633HI Yigit!
Almost! First, THANK YOU for helping me. I appreciate your time. My goal is to make this work for all my sites. I”m sure when I solve it for this site it will work for all other sites. I am going to try to not be too picky :) but here is what has happened.
I. On iPhone 6s Plus the icons were not centered so I adjusted the code to center the icons within the circles.
see screenshot 1
This part I changed from -10px to -2px#photo-center a.av-icon-char:before { left: -2px; position: relative; }
II. Result > caused center icons to be off-center on Android and iPhone 4s screens. I”m guessing it is probably off center for your iPhone 5s. Hmm.
see screenshot 2.III. Objectives:
A. I am trying to achieve the same dimensions for header slider and this icon section. On the iPhone 6s Plus, and I think on the iPhone 6 they are the same size.
B. I am trying to achieve centering of all icons on all mobile devices.IV. I moved ALL code we’ve added throughout this thread to the bottom of quick CSS. Perhaps something is conflicting?
/*mobile - icon - color section content*/ @media only screen and (max-width: 767px) { #top #wrap_all #photo-center .flex_column.av_one_third { width: 31%; height: 485px!important; float: left; clear: none; margin-left: 1%; }} /*content element: icon*/ @media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation: portrait) { a.av-icon-char { font-size: 20px !important; width: 20px !important; height: 20px !important; line-height: 20px !important; }} /*icon content element size*/ @media only screen and (max-width: 767px) { #photo-center .av-parallax .av-parallax-inner { background-position: 50% 50% !important; height: 165px !important; }} /*move background image*/ @media only screen and (max-width: 767px) { .avia-section { height: 165px; }} /*adjust color section size*/ @media only screen and (max-width: 767px) { span.av_font_icon.avia_animate_when_visible.av-icon-style-border.av-no-color.avia-icon-pos-center.avia_start_animation.avia_start_delayed_animation { position: relative; top: -40px; }} @media only screen and (max-width: 480px) { #photo-center a.av-icon-char { width: 15px!important; height: 15px!important; line-height: 15px!important; } #photo-center a.av-icon-char:before { left: -2px; position: relative; } #photo-center .av_icon_caption { font-size: 13px; }}
February 29, 2016 at 1:57 pm #590719Hey!
Please set left value to “-10px;” as i posted in my previous reply and then add following code to Quick CSS as well
@media only screen and (max-width: 580px) and (min-width: 481px) { #photo-center a.av-icon-char:before { left: -2px; position: relative; }}
Cheers!
YigitMarch 2, 2016 at 2:13 pm #592071Hi Yigit,
Thank you so much for helping me. This isn’t working. I think I may have an error in my CSS somewhere. You can take a look if you like. ALSO, I tried to move ALL CSS from quick CSS to Editor > style.css so I could have more room to work. Once I moved the CSS from Quick CSS to style.css, none of the CSS worked at all. So, I put it all back.
1. Do you know why no CSS is applied when deleting from Quick CSS to moving to style.css?
2. I attempted to change the values and it has no effect on my iPhone 6s Plus. The center icons are way to the right off-center. (see screenshot). I tried !important.
3. It looks perfect on an Android HTC ONE, iPhone 5s and iPhone 4s but looks not good on an iPhone 6. I had to edit the values a few pixels in a couple of locations.
4. This is ALL the CSS I have so far. We are almost there. This will be good so I can use it on my other sites!
/*mobile - icon - color section content*/ @media only screen and (max-width: 767px) { #top #wrap_all #photo-center .flex_column.av_one_third { width: 31%; height: 485px!important; float: left; clear: none; margin-left: 1%; }} /*content element: icon*/ @media only screen and (min-device-width: 414px) and (max-device-width: 736px) and (orientation: portrait) { a.av-icon-char { font-size: 20px !important; width: 20px !important; height: 20px !important; line-height: 20px !important; }} /*icon content element size*/ @media only screen and (max-width: 767px) { #photo-center .av-parallax .av-parallax-inner { background-position: 50% 50% !important; height: 165px !important; }} /*move background image*/ @media only screen and (max-width: 767px) { .avia-section { height: 165px; }} /*adjust color section size*/ @media only screen and (max-width: 767px) { span.av_font_icon.avia_animate_when_visible.av-icon-style-border.av-no-color.avia-icon-pos-center.avia_start_animation.avia_start_delayed_animation { position: relative; top: -40px; }} /*icon element position height*/ @media only screen and (max-width: 480px) { #photo-center a.av-icon-char { width: 15px!important; height: 15px!important; line-height: 13px!important; } /*center icon position in icon element*/ #photo-center a.av-icon-char:before { left: -12px; position: relative; } #photo-center .av_icon_caption { font-size: 13px; }} @media only screen and (max-width: 580px) and (min-width: 481px) { #photo-center a.av-icon-char:before { left: -2px; position: relative; }}
- This reply was modified 8 years, 9 months ago by Jasmer. Reason: Updated Screenshots
March 4, 2016 at 1:34 pm #593254Hi!
Please avoid duplicate css media queries. For example:
@media only screen and (max-width: 767px) { #photo-center .av-parallax .av-parallax-inner { background-position: 50% 50% !important; height: 165px !important; }} /*move background image*/ @media only screen and (max-width: 767px) { .avia-section { height: 165px; }} /*adjust color section size*/
The css above can be combined in to one:
@media only screen and (max-width: 767px) { #photo-center .av-parallax .av-parallax-inner { background-position: 50% 50% !important; height: 165px !important; } /*move background image*/ .avia-section { height: 165px; } /*adjust color section size*/ }
And this css declaration is not good because it will affect all color sections:
.avia-section { height: 165px; }
Use the color section’s Section ID selector instead.
Regards,
IsmaelMarch 9, 2016 at 12:55 pm #595529Hi,
Thanks.
1. Per your suggestion I changed I combined the CSS into one. Thank you this is good to know. I see 4 “@media only screen and (max-width: 767px)” Does this mean I need to combine all 4 in the list above?
So far, it does not change the iPhone 6s Plus (see below)2. This is the CSS Andy gave me here. What CSS do you suggest? This is a little tricky.
Andy CSS HereThank you for your help!
Jas
March 14, 2016 at 10:01 am #597632 -
AuthorPosts
- The topic ‘Content Element: Icon – On Mobile Site’ is closed to new replies.