1. Welcome to DNTrade. If you want to find out about the latest domain name industry news or talk, share, learn, buy, sell, trade or develop domain names - then you've come to the right place. It's a diverse and active community, with domain investors, web developers and online marketers - and it's free! Click here to join now.
    Dismiss Notice

Code Question

Discussion in 'Web Development' started by DnEbook, Jul 31, 2014.

  1. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    Thanks Ash and Tim
     
  2. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    Oh no ….I'm Back

    I have been trying to place a hyperlink on the rightside/center next to an image and to my surprise it worked, although i wish to raise it up half way to the middle of the pic it is next to( it currently sits down next to the bottom of the pic) and i would like to increase the font size but not with h1 h2 tags, will these be css issues or can i specify within the html document ? Example <40px> </40px>

    Below is where i have go it to but seeking more changes, i do realise people are busy but would be grateful for some hints/advice. Maybe i should be putting a textbox/field next to the pic. So far i am having some fun and getting a few small results but kinda hit a brick wall with this part? (the nofollow ref appeared when i posted here)

    <img src="speculating-tools.jpg"</img><center><a rel="nofollow" href="http://www.businessshow.tv" target="_blank">Business Channel</a></center>
     
  3. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    Are you guys including this for older browsers (something i have just seen on video) I understand it's purpose, just wondering common practice ??

    <!--[if lt IE 9]>

    <script>
    document.CreateElement ("article");
    document.CreateElement ("aside");
    document.CreateElement ("footer");
    document.CreateElement ("header");
    document.CreateElement ("main");
    document.CreateElement ("nav");
    document.CreateElement ("section");
    <! [end if]-->
     
  4. findtim

    findtim Membership: VIP

    Joined:
    Dec 13, 2011
    Messages:
    7,341
    Likes Received:
    1,509
    auDA Member:
    Yes
    browsers are free, so the user should just upgrade, i don't program for anything other then the latest version of the browsers.

    research/concerntrate more on mobile responsiveness

    also, just like biscuits " they go out of date" so check the date of the info you are getting...... as do websites

    tim
     
  5. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    I tend to agree but was surprised to see mentioned and catered for in the video i was watching (a html5 video)
     
  6. CityEnd

    CityEnd Membership: Community

    Joined:
    Aug 7, 2014
    Messages:
    20
    Likes Received:
    2
    It depends on your target audience and whether they would likely be still using windows XP where IE8 is the highest it can go. Best to check out your google analytics stats and see if it's worth the trouble catering for these users. as an example, our website has less than 5% of users who are using IE8 and IE7, but being an IT company we need to cater for these people, cause they obviously need help ;)

    It also depends if you utilise these new html5 tags <article>, <aside>.. etc if you don't use it then you won't have to worry about the code you mentioned.
     
  7. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    As i am trying to learn good habits from the start i am going ask which is the better proposition out of the follow few examples, i have looked at a few online videos and seeing variations in the info given. At the end of the day they all seem to work but it would be good to start in the best manner.

    Example One of how to start a css file All through the html page he only uses one class example (for the banner)
    @charset "UTF-8";

    article, aside, footer, header, main, nav, section {
    display:block;
    }

    article, aside, footer, header, main, nav, section {
    pading: 0;
    margin: 0;
    }

    body {
    background-color:#777;
    width:960px;
    margin-left:auto;
    margin-right:auto;
    }

    Etc ...



    Example Two Using Classes all the through the html file for reference in the css file



    <body class="body"> on the html file which is then used to style via .body on the css { example}

    .body {
    background-color:#777;
    width:960px;
    margin-left:auto;
    margin-right:auto;
    }

    Etc….

    After this he goes onto add a class to nearly every thing, article, aside, footer, header, main, nav, section


    So i am wondering if the top example where most is done within the page tags is normally used or is it better practice to be adding a class to all the page tags ( article, aside, footer, header, main, nav, section) as i construct a webpage,
     
  8. johno69

    johno69 Membership: VIP

    Joined:
    Nov 29, 2008
    Messages:
    2,663
    Likes Received:
    422
    auDA Member:
    Yes
    Adding a class enables you to target a specific area or areas for styling.

    You don't really need to add classes to every element, as you can always go back and add one where needed.
     
  9. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    Thanks CityEnd and Johno
     
  10. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    I am having 'small victories' as i learn a bit of this coding stuff but latest dilemma is that all the article text has become active. There is a nav section for a couple of pages, so i am guessing somehow the links have carried over to the section text. Any ideas ?
     
  11. findtim

    findtim Membership: VIP

    Joined:
    Dec 13, 2011
    Messages:
    7,341
    Likes Received:
    1,509
    auDA Member:
    Yes
    hard to say without looking but it sounds like you are missing a closing tag like </a>


    tim
     
  12. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    Thanks Tim, i start a search for that, however i am onto a new stumbling block as i have just tried my first Ftp and it was looking good until i tried to access the site and then got a message 403 forbidden. i guess i just have to delete the files and try again ?? I did a click and drag into the publc html files



    You don't have permission to access /.ftpquota on this server.

    Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
     
  13. findtim

    findtim Membership: VIP

    Joined:
    Dec 13, 2011
    Messages:
    7,341
    Likes Received:
    1,509
    auDA Member:
    Yes
    have you given the site enough disk space?

    500 errors, does it have a database?

    sometimes if you are in the database it will temporarily give a 500 error and then once you leave the database it comes up fine.

    tim
     
  14. neddy

    neddy Membership: VIP

    Joined:
    Oct 17, 2008
    Messages:
    3,671
    Likes Received:
    1,096
    auDA Member:
    Yes
    Given that you're now old, the saying "you can't teach an old dog new tricks" seems very apt. :D

    You should just be like me - don't even bother learning in the first place. Stick to what you're good at. LOL!
     
  15. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    Well to my surprise i am able to retain just a bit of this stuff and find it good fun to boot so i am happy to keep going. A week ago i did not know what a .css file is or a delegation block was? Besides i have a good bunch of folk to bounce a few questions off. As for being old i guess you can't hear my Sg Gibson guitar up BrisVegas way? Although i certainly tried to make it loud enough…… it's all good !!!
     
  16. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    Tim, i am not sure to be honest, i did one page site and a css file which i then dragged over to the public html via filezilla. It was my first go and that may be where the problem lay? I did purposely only try to ftp a small site/files as i thought it may go pearshaped. But i am not too down on myself as it was my first go and i can only learn from here on, thanks for the help/comments thus far.
     
  17. johno69

    johno69 Membership: VIP

    Joined:
    Nov 29, 2008
    Messages:
    2,663
    Likes Received:
    422
    auDA Member:
    Yes
    Tag not closed.
     
  18. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    I went to my public html files and the only folder for the domain was cgi-bin which was empty, so i guess the ftp did not work. What i also found was the site had changed in its appearance (my home version)
    ~
    i did find a 'bad' tag on the other question i had so i will try that again today as well.
     
  19. DnEbook

    DnEbook Membership: VIP

    Joined:
    Jun 26, 2008
    Messages:
    6,236
    Likes Received:
    766
    I decided to try the webpage again (where all the content was active) Below is the new try and the content below this is still active ...again ?

    <ul>
    <li>Home</li>
    <li><a href="m3about.html" /a>About</li>

    </ul>

    I have tried a few combinations but either lose the text or the link, i am sure i am missing something obvious but as this is another go and the same thing has happened i guess i am making the same mistake ?? Love to know what it is ?
     
  20. Ash

    Ash Membership: Trader

    Joined:
    Dec 21, 2010
    Messages:
    1,145
    Likes Received:
    63
    Hi Spacey,

    Need to close the a href tag like this:

    Cheers