1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

why same safari browser version but on different mac display shows different?

Discussion in 'CSS' started by macaela, Aug 11, 2011.

  1. #1
    Hi i keep getting this issue my friend has a mac and i have a mac now both our mac have the same safari version 5.0 i have desktop which the monitor is bigger than is has he uses a mac laptop but now everytime i style a page on is mac laptop looks different even thou we using the same browser version is there a reason why and how can i fix that issue?
    i've attached a foto which probably as you can see the sentence where it says
    (Please complete form bellow and we will contact you within 24 hours) is longer than the dark grey bar on top of it which is wrong but if you actually look at the page itself link is
    http://www.1st4film.biz/test/contactus.php the sentence fits nicely smaller Screen shot 2011-08-11 at 12.22.14.jpg than the bar on top of it what are the reasons that happens??
     
    macaela, Aug 11, 2011 IP
  2. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #2
    Firstly the source code shows that you have the <head> code 3 times remove the duplicates.

    Secondly around that writing your have <p4></p4> (paragraph) should these be <h4></h4> (heading) this may alter it. I have checked through your three CSS pages and not found a mention to <p4> so you can't be using the tags to style the writing.
     
    Toycel, Aug 11, 2011 IP
  3. macaela

    macaela Active Member

    Messages:
    181
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    The reason i have like 3 head tags is because i am using a include header thats another issue i wanted to ask but if you mention what i wanted to know is when writting headers and footers if i create a header file which i will include on the page like <?php include("header.html"); ?>
    on the header file
    do i just write the head tag open because on the body page which is another file do i put there the closing header? because when loading the page the head tag open will come frm the <?php include("header.html"); ?>
    or i am doing it wrong??
     
    macaela, Aug 11, 2011 IP
  4. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #4
    The header.html should have everything that comes before the <body> tag so you should open the <head> put the style sheets and scripts in it and then close the head tag in the file. The body.html page should start with <body>

    Have you tried changing the tags from <p4> to <h4>?
     
    Toycel, Aug 11, 2011 IP
  5. macaela

    macaela Active Member

    Messages:
    181
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #5
    thanks will do
     
    macaela, Aug 11, 2011 IP
  6. macaela

    macaela Active Member

    Messages:
    181
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #6
    what about meta tags will they still be included in every page just by having the include header?
     
    macaela, Aug 11, 2011 IP
  7. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #7
    Yes they will. If you want to change them for every page then don't use an 'include' in the head. IE different keywords for different pages
     
    Toycel, Aug 11, 2011 IP
  8. macaela

    macaela Active Member

    Messages:
    181
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #8
    ok what about if i wanted to use a middle header that will be located in the middle of the body so i would have to had include header middle section .php inside the body do i not include head and open and close body tags on that include middle file??
     
    macaela, Aug 11, 2011 IP
  9. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #9
    Basically all a PHP include does is take a file and drop it into the page.

    It's useful for menus that are on every page or that get changed regularly, this way similar to CSS you don't have to change the code on every page.

    If it helps, code the page in HTML and then split it up into sections

    inc.png

    forgive the simplicity of the drawing.

    Basically if you code the whole page in HTML then split it up like that you end up with an index page code that looks like

    
    <?php include('header.inc') ?>;
    <?php include('head.inc') ?>;
    <?php include('right.inc') ?>;
    <?php include('subhead.inc') ?>;
    <?php include('content.inc') ?>;
    <?php include('left.inc') ?>;
    <?php include('footer.inc') ?>;
    
    Code (markup):
    That could be the whole page code as the html is in the .inc pages as below.

    the header.inc would include all the info between the <doctype> and </head>
    head.inc would start with <body> and include anything that is going at the top of the page logos/headers/taglines
    right.inc is next and gets everything in the left hand column of the layout (menus, banners, etc)
    subhead.inc would probably be a heading/menu
    content.inc would be the main content of the page
    left.inc is again the right column (banner ads, links, pages, etc)
    footer.inc any footer links and this would end with </body></html>

    hope this helps
     
    Last edited: Aug 12, 2011
    Toycel, Aug 12, 2011 IP
  10. macaela

    macaela Active Member

    Messages:
    181
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #10
    the drawing was perfect ok just to clarify codewise so the right column i would have it like this

    <body>bla bla bla bla and leave the body tag open??
    so then on the left side i would hav
    no open tag bla bla bla bla and close body tag</body>

    hope thats right so what if i wanted to style those columns with css
    wouldnt i need the head to put the css link like
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <link href="style.css" rel="stylesheet" type="text/css" media="all" />
    <meta name="author" content="Redesign and Programming by www.eurico.co.uk">
    </head>
    Code (markup):
    or i would have to just

    <style>
    #div{float right}
    </style>
    <body>bla bla bla bla and leave the body tag open??
     
    macaela, Aug 12, 2011 IP
  11. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #11
    You can put the link to any CSS pages in the <head> that is in the head.inc file. They will still be located and used the same way as any other HTML document.

    The </body> tag should be the last thing on the page so that would be found at the bottom of the footer.inc just before </html>

    I'll write a quick code explaining it for you.
     
    Toycel, Aug 12, 2011 IP
  12. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #12
    I have quickly put together some code that should show you what I mean by this.

    The Full HTML with Comments..
    <!--start header.inc-->
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
    	
    	<title> </title>
    	
    	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    	
    	<link href="main_layout.css" type="text/css" rel="stylesheet" />
    	
    </head>
    <!--End header.inc-->
    <!--start head.inc-->
    <body>
    	<div id="container"><!--a wrapper-->
    		
    		<div id="head">
    			<img src="images/logo.gif" alt="logo" />
    		</div>
    <!--End of head.inc-->
    <!--Start of right.inc-->
    		<div id="sidebar_left">
    			<ul>
    				<li><a href="http://google.co.uk">Google</a></li>
    				<li><a href="http://ask.co.uk">Ask</a></li>
    			</ul>
    		</div>
    <!--End of right.inc-->
    <!--start subhead.inc-->
    		<div id="main_div">
    			
    			<div id="subhead">
    				You could have a tag line here above the content of the page
    			</div>
    <!--end of subhead.inc-->
    <!--start content.inc-->			
    			<div id="main_content">
    				Main content of the page, in this case a contact form
    			</div>
    		
    		</div>
    <!--end of content.inc-->
    <!-- start of left.inc-->		
    		<div id="sidebar_right">
    			<a href="http://google.co.uk"><img src="google_ads.gif" alt="google_ads" /></a>
    		</div>
    <!-- end of left.inc-->	
    <!--start footer.inc-->
    			<a href="
    		<div id="footer">
    			This template is a <a href="http://www.philipbroadhead.org">Philip Broadhead</a> template
    		</div>
    		
    	</div>
    
    </body>
    
    </html>
    <!--end of footer.inc-->
    Code (markup):
    And how this would look if you were to use the includes. If you are using PHP though don't forget to save it as 'index.php' rather than 'index.htm'..
    <?php include('header.inc'); ?>
    <?php include('head.inc'); ?>
    <?php include('right.inc'); ?>
    <?php include('subhead.inc'); ?>
    <?php include('content.inc'); ?>
    <?php include('left.inc'); ?>
    <?php include('footer.inc'); ?>
    Code (markup):
    split up HTML code for Header.inc is
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    
    <head>
    	
    	<title> </title>
    	
    	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    	
    	<link href="main_layout.css" type="text/css" rel="stylesheet" />
    	
    </head>
    Code (markup):
    and so on..
     
    Toycel, Aug 12, 2011 IP
  13. macaela

    macaela Active Member

    Messages:
    181
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #13
    @Toycel thank you very much understood thank you for taking the tiem to explain hope one day i can return the knowledge
    thanks:D
     
    macaela, Aug 12, 2011 IP
  14. Toycel

    Toycel Peon

    Messages:
    243
    Likes Received:
    11
    Best Answers:
    4
    Trophy Points:
    0
    #14
    It's not a problem, I have ten years experience in this field so I should know what I am on about, although sometimes not able to portray it correctly.

    Hope the site goes well
     
    Toycel, Aug 12, 2011 IP
  15. lysoleverywhere

    lysoleverywhere Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #15
    73 Errors. Looks like you have a lot more work to do.

    validator.w3.org
     
    lysoleverywhere, Aug 14, 2011 IP