HTML /CSS : Browser adaption, Letting user select font size (more to come ?)

  • Christian Chat is a moderated online Christian community allowing Christians around the world to fellowship with each other in real time chat via webcam, voice, and text, with the Christian Chat app. You can also start or participate in a Bible-based discussion here in the Christian Chat Forums, where members can also share with each other their own videos, pictures, or favorite Christian music.

    If you are a Christian and need encouragement and fellowship, we're here for you! If you are not a Christian but interested in knowing more about Jesus our Lord, you're also welcome! Want to know what the Bible says, and how you can apply it to your life? Join us!

    To make new Christian friends now around the world, click here to join Christian Chat.
W

wwjd_kilden

Guest
#1
I am still a newbie at this.

I can make the basic html page and link it with a stylesheet, and I even managed to place a few div's (yay), but not much more than that.

My first two questions are:

-You know those pages where you can click an A at the top (normally two or three of them) and make the font larger?
How do you actually make the font display larger?

- Is there a way to make the browser select the correct stylesheet?
Or is this too much hassle to be worth it as one needs two or more different ones (I know from experience sometimes certain browsers mess up the page.)


Yeah I know I can use google, but it is failing me today.
 
G

GaryA

Guest
#2
I am still a newbie at this.

I can make the basic html page and link it with a stylesheet, and I even managed to place a few div's (yay), but not much more than that.

My first two questions are:

-You know those pages where you can click an A at the top (normally two or three of them) and make the font larger? { Can you give me a URL to a page that is an example of this? }
How do you actually make the font display larger? { Most browsers offer a way to change the font size arbitrarily. If what you are talking about here is actually on an HTML page itself, then it is probably JAVASCRIPT 'enhanced'. ( Just plain HTML code will not accomplish it. The only other option you have is dynamically-generated HTML pages. ) }

- Is there a way to make the browser select the correct stylesheet? { Other than with dynamically-generated HTML pages - no. }
Or is this too much hassle to be worth it as one needs two or more different ones (I know from experience sometimes certain browsers mess up the page.)


Yeah I know I can use google, but it is failing me today.
:)
.....
.....
 
G

GaryA

Guest
#3
Other than with dynamically-generated HTML pages - no.

Or, "No, I don't think so."
 
W

wwjd_kilden

Guest
#5
Thanks :)

Well, currently I am just using FireFox on Win 7 (IE wouldn't display my document at all for some reason. I hate IE :p
I just remember from school that firefox, IE and opera would occasionally change how the divs were positioned)

Let's see, a page with an example... wow, that was difficult to find, maybe it's old- fashioned...I can't find one :p
Maybe it isn't used anymore.

but, the end of the story is I have to learn Javascript? (booo :p )

PS: I should probably brush up on my extremely limited PHP skills too. I used to have Wampserver to run PHP code,
is that a good choice or are there better ways of doing things?
 
G

GaryA

Guest
#6
Thanks :)

Well, currently I am just using FireFox on Win 7 (IE wouldn't display my document at all for some reason. I hate IE :p
I just remember from school that firefox, IE and opera would occasionally change how the divs were positioned)

Let's see, a page with an example... wow, that was difficult to find, maybe it's old- fashioned...I can't find one :p
Maybe it isn't used anymore.

but, the end of the story is I have to learn Javascript? (booo :p )

PS: I should probably brush up on my extremely limited PHP skills too. I used to have Wampserver to run PHP code,
is that a good choice or are there better ways of doing things?
You can learn Javascript. ( I would like to get into Javascript - and maybe PHP, too - one of these days, Lord willing... )

OR

You can write code in your favorite script language ( I like 'Perl' ) to dynamically generate HTML pages. :cool: ( I have been doing this for some time already. ) You can do just about anything you want - within the limits of HTML code, of course. :rolleyes:

:)
 
W

wwjd_kilden

Guest
#7
Hmmmm. How does one do that? (The second bit)
is it like what I am already doing? (I only have a few lines of code from school)
Sounds complicated if one is to make it generate all of the html

<?php
$pagetitle='TESTSITE';
$css='Stylesheet.css';
require_once("header.php");

?>

<body>
blablabla
</body>
.....
 
W

wwjd_kilden

Guest
#8
my header file is most html, only using php to send the needed info

<?php
echo "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
?>

<!DOCTYPE HTML>
<head>
<meta charset="utf-8"/>
<meta name="keywords" content="html, php;" />
<meta name="author" content="..."/>

<!-- TEST --->
<link rel="stylesheet", href="<?php echo $css ?>" type="text/css">
<!-- -->

<title>
<?php
echo $pagetitle;
?>
</title>
<!--
<link rel="stylesheet" type="text/css" href=echo $path media="screen" />
-->


</head>
 
W

wwjd_kilden

Guest
#9
another question came to mind:

To what degree would you repeat code vs put it in a separate file (only a few lines).
I have the same head div on each page, should I make it a separate file and add it, or just repeat code?
(It make my top div clickable to take me to the main page)

<div class="clickable">
<a href="Webpage.php"> </a>
<h1> Hjemmeside </h1>
</div>
 
G

GaryA

Guest
#10
In general, I think you are headed in the right direction. You will have to write some php code that would determine the OS and browser at the client end ( from the server environment variable 'HTTP_USER_AGENT' ) and modify the output HTML accordingly. Are you already aware of how you might do this with php code?

:)
 
W

wwjd_kilden

Guest
#11
I have no clue whatsoever :D

I am also trying to look into MVC using PHP, but I haven't really gotten started on it yet
 
G

GaryA

Guest
#12
I have no clue whatsoever :D

I am also trying to look into MVC using PHP, but I haven't really gotten started on it yet
I did not know what 'MVC' was, so I had to research it...

It is a very logical 'modular' approach. :cool:

And -- I should definitely look into PHP first / next chance I get...

:)
 
W

wwjd_kilden

Guest
#13
:)
I have used it with Java, but that is such a long time back I remember nothing of it :p
not sure how to "transfer" it to PHP as it seems to "behave" very differently
 
May 18, 2010
931
15
18
#14
well, you know how to do it in google already, firefox is not much different, click the three line drop down menu in the top right corner of the browser you will see near the top of the menu a - sign, 100%, and a + sign for enlarging and downscaling the page. If it's not there you must be using an older version of firefox, maybe if that's the case uninstall it and install a fresh new updated version from the site.
 
May 26, 2013
55
0
6
#16
I am still a newbie at this.

I can make the basic html page and link it with a stylesheet, and I even managed to place a few div's (yay), but not much more than that.

My first two questions are:

-You know those pages where you can click an A at the top (normally two or three of them) and make the font larger?
How do you actually make the font display larger?

- Is there a way to make the browser select the correct stylesheet?
Or is this too much hassle to be worth it as one needs two or more different ones (I know from experience sometimes certain browsers mess up the page.)


Yeah I know I can use google, but it is failing me today.

you mean, when you hover a menu? the text becomes larger? just use :hover for example the id of the text is #menu write a #menu: hover{} in css right after #menu{}

and about browser compatibility with ur css, there are equivalent hacks for every css property. you don't need to do it with php
 
W

wwjd_kilden

Guest
#17
Thanks folks, I know how to do it myself, it was more a matter of how to apply it to a web page I am making

I'll see if I can find out more about the css way of fixing stuff :)
 
G

GaryA

Guest
#18
Thanks folks, I know how to do it myself, it was more a matter of how to apply it to a web page I am making

I'll see if I can find out more about the css way of fixing stuff :)
"Please feel free to come back and share the knowledge..." ;) :cool:

:)