+ Reply to Thread
Results 1 to 6 of 6

Thread: External CSS above root folder

  1. #1
    tillabong is offline x10Hosting Member tillabong is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    60

    External CSS above root folder

    hi i've managed to link to my database login which is above my root folder using php. however when i try to do the same for my external css, it doesnt work. is there a way to go about doing this?

    thanks.

  2. #2
    marshian's Avatar
    marshian is offline x10 Elder marshian is an unknown quantity at this point
    Join Date
    Jan 2008
    Location
    Belgium
    Posts
    526

    Re: External CSS above root folder

    You can't link to any files client-side that aren't publicly available. If you have a file above public_html (or www), you simply cannot link to it. So you'll have to move your css inside public_html.
    Real programmers don't document their code - if it was hard to write, it should be hard to understand.

  3. #3
    tillabong is offline x10Hosting Member tillabong is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    60

    Re: External CSS above root folder

    the databse login file and css are all within the public_html folder.

    public_html/mywebsite.com is my root domain

    public_html/css is where i put the css files.

    the link worked when i used php to get the database login file but didnt work for the css.

    im sorry if i didnt explain it clearly in the first place.

  4. #4
    Anna's Avatar
    Anna is offline I am just me Anna is a name known to allAnna is a name known to all
    Join Date
    Aug 2007
    Location
    Sweden
    Posts
    6,569

    Re: External CSS above root folder

    when entering the domain mywebsite.com the folder mywebsite.com is root for that domain. Php files can be placed outside of that root as they are accessed server side. css however is accessed by the end users browser, which can not read anything outside of the root folder for that domain.
    Do you have trouble reaching your site?
    Check here first: News and Announcements


    Don't forget that x10hosting has an irc server as well. Come and join the fun
    server: irc.x10hosting.com, main channel: #x10hosting
    There's a lot helpful users there if need help building your site

  5. #5
    tillabong is offline x10Hosting Member tillabong is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    60

    Re: External CSS above root folder

    ok thank you very much for your reply.

  6. #6
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: External CSS above root folder

    Try using

    src="http://wheretogoatnight.x10hosting.com/css/mycssfile.css"

    as your link to your css file.
    Last edited by descalzo; 02-11-2010 at 10:54 AM.
    Nothing is always absolutely so.

+ Reply to Thread

Similar Threads

  1. Redirect Root Directory to Subdirectory w/ Joomla
    By caiol611 in forum Tutorials
    Replies: 8
    Last Post: 02-17-2011, 04:31 PM
  2. Can not install to root folder!
    By xatrix in forum Programming Help
    Replies: 2
    Last Post: 10-26-2008, 06:41 PM
  3. Root folder for subdomain
    By AndyH in forum Free Hosting
    Replies: 4
    Last Post: 02-11-2008, 05:03 PM
  4. Replies: 3
    Last Post: 09-21-2007, 01:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers