Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 11 of 11
  1. #1
    New Coder
    Join Date
    Oct 2009
    Posts
    21
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Translating into CSS

    nevermind..
    Last edited by ilovetechno; 10-21-2009 at 12:38 AM.

  • #2
    Senior Coder effpeetee's Avatar
    Join Date
    Feb 2007
    Location
    Clapham Junction - London SW
    Posts
    4,885
    Thanks
    228
    Thanked 204 Times in 203 Posts
    Far too much to answer here. The best I can do is to point you here.

    Frank.
    * Sources (updated: 21.11.2012.
    Using Windows 8 Professional. 64bit with HP Photosmart 5510 printer Very useful site here.

  • #3
    New Coder
    Join Date
    Oct 2009
    Posts
    21
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Oh wow.. so much going on on that site I wouldn't even know where to start. Thanks anyways. I guess I'll have to keep trying random stuff until I figure it out, if ever

  • #4
    New Coder
    Join Date
    Oct 2009
    Posts
    21
    Thanks
    5
    Thanked 0 Times in 0 Posts
    After some more research I think what I need to go for is PHP not CSS. I'll have to get myself familiar with PHP now!

  • #5
    Regular Coder
    Join Date
    May 2009
    Posts
    143
    Thanks
    14
    Thanked 1 Time in 1 Post
    what is exactly what you try to achieve?
    php is a server-code only. it will calculate stuff for you but in the end, it wil print html/css to display your data

  • #6
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    So much more important than your css is your code. 130 odd validation errors and you have used tables for layout which is not good. Also, you have no DOCTYPE so the browsers have to guess what way you want the page to be laid out.

    http://validator.w3.org/check?uri=ht...idator%2F1.654


    However, moving your css into a separate stylesheet file (which is what you want to be doing) is simple. Just copy the css code from the head of your page into a text file and save it as style.css or something with a .css ending.
    like this

    body {background-color: #ff99cc;}
    .fullSize {margin: 25px;}
    .thumbNail img {border: 2px solid #fb008e; margin-left: 3px; margin-top: 3px; margin-right: 3px; margin-bottom: 3px;
    width: 130px; height: 200px;}
    A:link {text-decoration: none}
    A:visited {text-decoration: none}
    A:active {text-decoration: none}
    A:hover {text-decoration: none}
    However, I recommend you fix the layout of the site to use semantic code and then put the css into the separate file. That will ensure as far as possible, that you do not run into this headache again further along the road.

    Important ~ priorities:

    1. learn enough MySQL to put your stuff into a database. (look up 'database normalisation',
    2. learn php so you can retrieve that data as appropriate to a 'query' and output the results to the web page. (or use perl or other server side language)
    3. use css to style that output. (best I think, to work with firefox and use the plug ins like 'web developer' and 'firebug')

    check for validation errors throughout coding so you catch them earlier and, therefore cause fewer.


    hth

    Edit:
    That example page does not say anything about where you are in the world. I guess you are in the UK but that is only because your dress sizes start at 6-8 and not -40! lol


    bazz
    Last edited by bazz; 10-19-2009 at 09:04 PM.
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • Users who have thanked bazz for this post:

    ilovetechno (10-19-2009)

  • #7
    New Coder
    Join Date
    Oct 2009
    Posts
    21
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Basically, I have a horizontal menu that I use on every page for an online store I'm coding for. It would be extremely time consuming (and I'd basically rather throw myself off a cliff) if I had to change a simple part or add another option to the menu and have to go through EACH of the hundreds of pages to edit them.

    Therefore, I was looking for a way to be able to edit a main code somewhere and maybe call that page with the code and have that be inserted into the page. But I don't know where to begin at all with PHP.. do I just use the php code or do I have to take steps before I could even use the php code?

  • #8
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Ah I thought this started out as a css thing

    Anyhoo, php would let you have a dynamic page creation process where the content of the page is determined by params sent from one page to another, when the user clicks a link.

    I think it would be simpler and would save time, if you learned enough of php, to be able to make dynamic pages and if you combine this with MySQL, you can run your entire site from it. Basically, I think you want a shopping site/software.

    Look through the server side languages forums to see what you can learn and go from there, using tutorial sites that you read about. I don't use php yet - preferring perl - but I reckon php would be easier to get a handle on.

    hth

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link

  • #9
    New Coder
    Join Date
    Oct 2009
    Posts
    21
    Thanks
    5
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by bazz View Post
    So much more important than your css is your code. 130 odd validation errors and you have used tables for layout which is not good. Also, you have no DOCTYPE so the browsers have to guess what way you want the page to be laid out.


    However, I recommend you fix the layout of the site to use semantic code and then put the css into the separate file. That will ensure as far as possible, that you do not run into this headache again further along the road.



    Edit:
    That example page does not say anything about where you are in the world. I guess you are in the UK but that is only because your dress sizes start at 6-8 and not -40! lol


    bazz
    Wow, that many errors? The page looks fine when I look at it. I guess I'm in the wrong hobby then!(Wait, I'm looking now, and several of those errors are from the part of the code that a user on here gave me for image switching onclick- which I don't understand really I just c&p'd. Also, a lot of those I don't understand where the error is, for example
    Line 78, Column 40: start tag was here



    I use tables because I have no other idea how to organize things using something else with the same end result. I despise them, but I can't knock it when its the only thing I know.

    That Doctype thing I've never known what it was and when I took it out it didn't seem to make a difference so I just deleted it. How do you figure out which one you need or should use?
    Last edited by ilovetechno; 10-21-2009 at 12:37 AM.

  • #10
    New Coder
    Join Date
    Oct 2009
    Posts
    21
    Thanks
    5
    Thanked 0 Times in 0 Posts
    I'm sorry if all of these questions are stupid but clearly I'm clueless. I've been doing html for almost 10 years now (the bulk of which was spent doing the very basics until now, I've just started learning java script and CSS within the last few months) and thought I was mediocre but there's SO much I need to learn! Nobody around me knows a single thing about web design so I have nobody to help me out and I plan on going to school for it eventually, but until then I'm stuck with trial&error and whatever I find in forums or instructive pages that I find in a Google search. Which apparently haven't been getting me very far! lol !

  • #11
    Master Coder
    Join Date
    Apr 2003
    Location
    in my house
    Posts
    5,211
    Thanks
    39
    Thanked 201 Times in 197 Posts
    Quote Originally Posted by ilovetechno View Post
    Nobody around me knows a single thing about web design so I have nobody to help me out
    That's where I started from.

    OK, I'll take another look at your page later (in the middle of something right now so I can't take a couple of hours out). I'll structure a simple page with css and see if you can slot in the content you need to.

    Not doing it for you but it should give you a basis for semantic coding from where you can learn fairly quickly.

    bazz
    "The day you stop learning is the day you become obsolete"! - my late Dad.

    Why do some people say "I don't know for sure"? If they don't know for sure then, they don't know!
    Useful MySQL resource
    Useful MySQL link


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •