Mac os x and textedit vs. 1.7

Posted:
in Mac Software edited January 2014
Hello all, I'm a nob when it comes to web design and I'm using textedit to try and create a web page... My issue is when writing html in textedit I can change the width of my tables, but can't change the height.... When viewing in rich text I can drag the table to increase the size when i do this textedit writes code for me but I don't want that... I want to learn this language on my own with no help from a program should i be using something other than textedit? Here is the basic html, css language I'm using am I doing something wrong or is this just the way textedit operates? Thanks for your time....

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">;



<html>

<head>

<style type="text/css">

table,th,td

{

border:1px solid black;

}

table

{

width:100%;

}

th

{

height:500%;

}

</style>

</head>



<body>

<table>

<tr>

<th>Firstname</th>

<th>Lastname</th>

</tr>

<tr>

<td>Peter</td>

<td>Griffin</td>

</tr>

<tr>

<td>Lois</td>

<td>Griffin</td>

</tr>

</table>

</body>

</html>

Comments

  • Reply 1 of 4
    tallest skiltallest skil Posts: 43,388member
    Quote:

    I want to learn this language on my own with no help from a program



    There's your first problem. There's no better place to learn HTML than w3schools.



    Also, don't run inline CSS; it's poor practice.



    I do all of my HTML in TextEdit myself, but have you seen Coda?



    Quote:

    My issue is when writing html in textedit I can change the width of my tables, but can't change the height....



    The height property is deprecated. It shouldn't be used anymore.
  • Reply 2 of 4
    Quote:
    Originally Posted by Tallest Skil View Post


    There's your first problem. There's no better place to learn HTML than w3schools.



    Also, don't run inline CSS; it's poor practice.



    I do all of my HTML in TextEdit myself, but have you seen Coda?







    The height property is deprecated. It shouldn't be used anymore.





    Thanks, I'm learning with W3, I'll look into coda and what inline CSS means...
  • Reply 3 of 4
    tallest skiltallest skil Posts: 43,388member
    Quote:
    Originally Posted by scrappers View Post


    Thanks, I'm learning with W3, I'll look into coda and what inline CSS means...



    Inline CSS is how you have it up there; you have the style within the HTML file itself.



    External CSS resides in its own .css file in the same folder as the .html file of the site (or, you know, wherever you want to put it, since you tell the HTML file where it is; it's just easier to keep them together.



    The benefit of the latter is its ability to be applied to multiple HTML files with a minimum of disk (and therefore download) space and the ability to make a change to one file (the .css file) and have that apply to ALL of the HTML files at once.



    http://panic.com/coda/



    There's Coda. It's what Dreamweaver only? dreams? it could be. HOLYCRAPTERRIBLEPUN
  • Reply 4 of 4
    MarvinMarvin Posts: 15,310moderator
    Quote:
    Originally Posted by scrappers View Post


    should i be using something other than textedit?



    You can set Textedit to ignore rich text commands in HTML in the preferences and it won't load HTML in preview mode but generally, you should use a code editor so you get syntax colouring. A free option is:



    http://www.barebones.com/products/textwrangler/



    Then just open your page in a browser to preview and reload when you make a saved change.



    Quote:
    Originally Posted by Tallest Skil


    Inline CSS is how you have it up there; you have the style within the HTML file itself.



    Inline would be e.g <p style="padding:5px">, the above is an internal stylesheet. I agree that external is preferred but there are occasions when inline or internal stylesheets work better - sometimes necessary like if you send an HTML email from a server.



    Quote:
    Originally Posted by Tallest Skil


    The height property is deprecated. It shouldn't be used anymore.



    The CSS height attribute isn't deprecated, only the HTML 4 <tr height="25"> types. What was used in the above example was ok.



    Quote:
    Originally Posted by scrappers


    th

    {

    height:500%;

    }



    When you set a percentage height, remember you are setting it relative to the size of the parent. If you use 500% height, you are saying you want the table row (th) to be 5 times the height of the entire table. Usually, you'll just want to add padding to the rows.
Sign In or Register to comment.