- Posts: 41
- Thank you received: 0
Margins for content area when in mobile narrow format
- 
        kent8
 Active member
- 
            
				 Topic Author Topic Author
- Member
- 
              
        Less
        More
        
            
    
        
            
        
                6 months 2 weeks ago                #51840
        by kent8
    
    
            
            
            
            
            
                                
    
                                                
    
        Margins for content area when in mobile narrow format was created by kent8            
    
        sometimes i get SO frustrated looking for all the non-standard ways to apply CSS... ARG !
Here:
townoflimon.com/index.php/alternate01
I am trying to set up an easy way for htis client to post word processing documents as HTML, to avoid the PDF problems.
As you can see, it's not too bad in full screen mode.
BUT when it is squezed down to narrow, for smart phones, there is no margin at all, that that is not good.
HOW can I apply custom CSS to this to get a margin, let's say 10 pixels, to the left and right sides of this content when narrow ?
Thanks ,
Kent
Here:
townoflimon.com/index.php/alternate01
I am trying to set up an easy way for htis client to post word processing documents as HTML, to avoid the PDF problems.
As you can see, it's not too bad in full screen mode.
BUT when it is squezed down to narrow, for smart phones, there is no margin at all, that that is not good.
HOW can I apply custom CSS to this to get a margin, let's say 10 pixels, to the left and right sides of this content when narrow ?
Thanks ,
Kent
Please Log in to join the conversation.
- 
        milos
 Support Staff
- 
            
				  
- Moderator
- 
              
        Less
        More
        
            
    
        - Posts: 6899
- Thank you received: 737
            
        
                6 months 2 weeks ago                #51841
        by milos
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by milos on topic Margins for content area when in mobile narrow format            
    
        Hello,
I see you tried by adding this to /media/templates/site/museum/css/custom.css:
This is not valid. Instead, try adding this:
It will be applied only if the screen width is 414px or less (you can change this in the CSS code).
If you are testing with a mobile device, make sure you delete the mobile browser's cache after making changes to the CSS files.
Regards,
Milos
I see you tried by adding this to /media/templates/site/museum/css/custom.css:
Code:
.sparky_page_row {
    padding-left: 30 !important;
}
This is not valid. Instead, try adding this:
Code:
@media (max-width: 414px) {
    .content_sparky .sparky_page_container {
        padding: 0 10px;
    }
}
It will be applied only if the screen width is 414px or less (you can change this in the CSS code).
If you are testing with a mobile device, make sure you delete the mobile browser's cache after making changes to the CSS files.
Regards,
Milos
Please Log in to join the conversation.
        Time to create page: 0.141 seconds    
    