Designing a responsive website

RiskyRyan

New Member
Feb 17, 2015
15
0
Hey guys,
making my portfolio website currently, I know all my CSS3 designing stuff and back-end management blah blah get the point I'm good at PHP all that. But I've never attempted making a responsive website. I need some tips, tricks and techniques which could help my site fold in.

I have already began development on this little project of mine:
Code:
<div class="logo">
    <span class="logo-text-red">Ryan</span>
    <span class="logo-text-white">Squalky</span>
</div>
This text is going to be 40px but I need it to automatically re-size to a correct px so that it automatically fits any device. ( )
 
Last edited:

RastaLulz

fight teh power
Staff member
May 3, 2010
3,926
3,921
Use that are provided in CSS3.

Here's how you'd change the font-size when the screen is smaller than a specific width:
Code:
@media all and (max-width: 245px)
{
    .logo
    {
        font-size: 25px;
    }
}

The CSS provided will change the font-size to 25px when the window is less than or equal to 245px wide.
 

Jemz

xmas tings.
Aug 6, 2013
166
17
I might be wrong but
HTML:
<meta name="viewport" content="width=device-width, initial-scale=1" />

putting that in the <head> will also sort it for you.
 

brsy

nah mang
May 12, 2011
1,530
272
I might be wrong but
HTML:
<meta name="viewport" content="width=device-width, initial-scale=1" />

putting that in the <head> will also sort it for you.
That isn't as specific as using media queries. Media queries is definitely the way to go; I've used media queries for every mobile website I've ever done, and it works fine. It may seem like a lot more work but it actually is worth it.
 

RiskyRyan

New Member
Feb 17, 2015
15
0
That isn't as specific as using media queries. Media queries is definitely the way to go; I've used media queries for every mobile website I've ever done, and it works fine. It may seem like a lot more work but it actually is worth it.
Did you have to versions of your site coded? One for desktop and one for mobile seperatly coded?
 

brsy

nah mang
May 12, 2011
1,530
272
Did you have to versions of your site coded? One for desktop and one for mobile seperatly coded?
I had one main css files, just different media queries defining the width/height of specific elements like the img tag, or hiding specific elements that would be too time consuming to make mobile-oriented.
 
Check this out.


 
and this..
 

Sysode

Front-End Developer
Dec 11, 2012
1,673
848
That isn't as specific as using media queries. Media queries is definitely the way to go; I've used media queries for every mobile website I've ever done, and it works fine. It may seem like a lot more work but it actually is worth it.
What @Saintz quoted is still needed in responsive web design, it is to be used alongside media queries.

I think it's important to get your head around what media queries are and how they actually work.. To put it in simple terms, it's basically recoding the elements of your site that do not work on particular devices. You come to learn the dimensions of these devices and then you can start using the ones that matter most. Obviously there are "preferred" ways to code CSS but to start, I think it'd be best to get your head around how they work and they are capable of doing.

If you require any help, I'm sure the helpful community will assist Kappa .
 

Users who are viewing this thread

Top