Old school, innit?

MadameSkylark

New Member
Messages
66
Reaction score
0
Points
0
I was unaware that it was considered dated to do coding without using a style sheet, but apparently...no one does it anymore. Well, I like it much better that way, so could someone tell me where to find (Or provide me with) the tags for positioning a piece of text on a page?

IE, I want this blurb of text to sit at...
top: 660px;
left: 290px;
height: 100px;
width: 330px;

WITHOUT using the stylesheet format, how would I just wrap the text in tags that tell it where to sit on the page?
 

mattura

Member
Messages
570
Reaction score
2
Points
18
css can go between <style> tags:
HTML:
<html>
<head>
<style>
div {margin-top:660px;margin-left:290px;height:100px;width:330px;border:solid 1px blue;}
div.special {font:solid 1px courier;color:#f00;}
</style>
</head>
<body>
<div>A block of text<div class='special'>Special box!</div></div>
</body>
</html>
 
Last edited:

MadameSkylark

New Member
Messages
66
Reaction score
0
Points
0
Hmm...so what would that look like if the text was "I love bubbles! They are pretty!"
 

mattura

Member
Messages
570
Reaction score
2
Points
18
Obviously it would look awesome. Well I'm sure you can imagine...
 

MadameSkylark

New Member
Messages
66
Reaction score
0
Points
0
o_O

It WOULD be pretty awesome, but using that formula you provided, where would the text fit in?
 

xmakina

New Member
Messages
264
Reaction score
0
Points
0
Why not try it yourself? You can test HTML and CSS without even using a website, just open the file in your brower :)
 

freecrm

New Member
Messages
629
Reaction score
0
Points
0
WITHOUT using the stylesheet format, how would I just wrap the text in tags that tell it where to sit on the page?

If you don't want to use stylesheets (which are much preferred), you'll have to revert back to tables :(

HTML:
<table>
<tr>
<td width="290">&nbsp;</td>
<td height ="600">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td width="330" height="100">I love bubbles! They are pretty!</td>
</tr>
</table>

I tend to use a mix of tables and .css for ease.
 

crisp

New Member
Messages
85
Reaction score
0
Points
0
If you don't want to use stylesheets (which are much preferred), you'll have to revert back to tables :(

HTML:
<table>
<tr>
<td width="290">&nbsp;</td>
<td height ="600">&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td width="330" height="100">I love bubbles! They are pretty!</td>
</tr>
</table>
I tend to use a mix of tables and .css for ease.
You don't have to use tables, not using a stylesheet doesn't automatically mean you need tables. You could use in-line styles, ie styles attached to the tags, taking the original code example, with inline styles, looks like this, not a table in sight...
HTML:
<html>
<head>
<title>Inline styles</title>
</head>
<body>
<div style="margin-top:660px;margin-left:290px;height:100px;width:330px;border:solid 1px blue;">
    A block of text
    <div style="font:solid 1px courier;color:#f00;">
        Special box!
    </div>
</div>
</body>
</html>
 
Top