Solved

HTML, CSS, Change content on mobile

Posted on 2013-06-02
2
184 Views
Last Modified: 2013-09-16
Hi,

I have the below code, what I want to do is change the size of the Title which is The S R and remove the logo if someone is using a mobile device, please help how can I do this

     <div class="row" style="border-left: 1px solid black; border-right: 1px solid black;
            background-color: Black; font-family: Georgia,'Times New Roman',Times,serif;">
            <div class="large-12 columns" style="color: White; font-weight: bold; font-size: 65px;
                padding-top: 10px; padding-bottom: 10px; padding-left: 10px; ">
                <img src="images/Email.gif" alt="Logo" style="padding-right: 25px;" />
                The S R
            </div>
        </div>

Open in new window


If this mean creating another CSS file thats fine as well I need to know how to detect the mobile device and use the CSS accordingly

Thanks

R8VI
0
Comment
Question by:R8VI
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 10

Expert Comment

by:Ishaan Rawat
ID: 39214311
Try this...

HTML
     <div class="row" style="border-left: 1px solid black; border-right: 1px solid black;
            background-color: Black; font-family: Georgia,'Times New Roman',Times,serif;">
            <div id="header" class="large-12 columns" style="color: White; font-weight: bold; font-size: 65px;
                padding-top: 10px; padding-bottom: 10px; padding-left: 10px; ">
                <img src="images/Email.gif" alt="Logo" style="padding-right: 25px;" />
                The S R
            </div>
        </div>

Open in new window




CSS:
@media only screen and (max-width: 500px){
   #header img{
         display:none;
    }
    #header{
          font-size: 40px !important; // Change it acc. to you... 
     }
}

Open in new window



This is done with media queries... See here... a good tutorial on it...
http://mobile.smashingmagazine.com/2010/07/19/how-to-use-css3-media-queries-to-create-a-mobile-version-of-your-website/
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 500 total points
ID: 39214319
detecting the device is not reliable, and can cause more problems than it solves.  What you need to do is detect the device characteristic and present alternate CSS using media queries

Cd&
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question