Jump to content

External stylesheet is not working


Mo

Recommended Posts

I'm trying out the php shoppingcart tutorial, Paypal-4-building-the-catalog-page.mov

In index.php in the head

main.css

@CHARSET "UTF-8";

*

{

margin: 0 0;

padding: 0 0;

font-family: Helvetica, arial, sans-serif;

}

/* template */

body

{

margin: 0 auto;

background: #EEE;

 

}

.wrapper

{

width: 980px;

padding: 9px;

background: #FFF;

border: 1px solid #EFEFEF;

margin: 0 auto;

text-align: center;

}

 

It's not working in Safari.

Where should I take a good look at?

Link to comment
Share on other sites

If it works in all other browsers except Safari, then that's very unusual.

 

Try clearing the Safari cache as it may not have been downloaded properly, or at all.

 

Try deleting @CHARSET "UTF-8"; from the very top of it; it's usual to put a meta tag for the charset in the page head section.

Link to comment
Share on other sites

Does it work in any browsers? If not, it's probably a path problem.

means that the css file main.css is in a sub-directory/folder called css of the one that the php file is in, so check that the css folder/directory is a sub-directory.

 

ALSO delete the / before the css/main.css:-

 

(An alternative would be:-

where the css folder is in a higher level directory/folder than the one containing the php file) as .. / goes up a level.)

Edited by Wickham
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...