Solved

HTML, CSS, Change content on mobile

Posted on 2013-06-02
2
186 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
This article discusses how to implement server side field validation and display customized error messages to the client.
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
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.…
Suggested Courses

628 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