Personal computing discussed

Moderators: renee, SecretSquirrel, just brew it!

 
Illissius
Graphmaster Gerbil
Topic Author
Posts: 1116
Joined: Thu Oct 23, 2003 5:25 am
Location: Hungary
Contact:

A bit of help with my site...

Thu Sep 09, 2004 11:17 am

illissius.uw.hu

So far this is just a prototype, meaning static HTML, I'll hack up something dynamic with PHP once I'm satisfied with it.

Here's how it looks in Opera:

Image

And in Konqueror (same basic rendering engine as Apple's Safari, possibly a different revision):

Image
(I prob. have larger fonts configured which is why the fonts are larger)

Could someone post shots from Firefox and IE?

Anyways, need a bit of help with the following things:
- How do I make it so that the two columns of boxes start at exactly, meaning to the pixel, same place from the top?
- How about to control how much of the screen each of them takes up horizontally? ie, I'd like to set one column to use the left 70% of the screen, and the other the remaining 30%.
- Is there any way to make the borders below the headers and above the footers get the hover effect when the mouse is hovered over the box they're in, and not just when it's over the borders themselves?
- Konqueror seems to like putting a lot of extra space in the headers/footers, and wouldn't be surprised if other rendering engines do as well... is there any way to explicitly tell them not to?
EDIT - One more. What's the difference between cellpadding and cellspacing? I noticed differences in the output, but not enough to determine what's the difference in what they're actually supposed to be doing.
Any other suggestions are also welcomed... though I mostly like the design/layout as it is, I'm more interested in the 'how', rather than the 'what' side of things.

Here's the HTML for reference:

<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  <meta http-equiv="Content-Language" content="en-us">
  <meta name="description" content="This is Illissius's website.">
  <link rel="stylesheet" type="text/css" href="style/default.css" />
  <title>Illissius's website</title>
 </head>

 <body>
 
  <table width=100%>
   
   <tr><td colspan=10>
    <h1><a href="http://illissius.uw.hu">Illissius's site</a></h1>
   </td></tr>
   <tr><td width=100% align=center colspan=10>
    <h6 class="navigation"><a href="index.php">main</a> | <a href="news.php">news</a> | <a href="quotes.php">quotes</a> | <a href="links.php">links</a> | <a href="about.php">about</a></h6>
   </td></tr>
   
   <tr><td>
    <table colspan=7 width=100% cellpadding=20>
   
     <tr><td>
      <table class=boxed>
       <tr><td class=underborder><h6>This is the header</h6></td></tr>
       <tr><td><h3>This is the title</h3></td></tr>
       <tr><td><p>This is the body</p></td></tr>
       <tr><td class=overborder><h6>This is the footer</h6></td></tr>
      </table>
     </td></tr>
     
     <tr><td>
      <table class=boxed>
       <tr><td class=underborder><h6>21:49, Wednesday, September 8, 2004. by Illissius</h6></td></tr>
       <tr><td><h3>Random post</h3></td></tr>
       <tr><td><p>Bla, bla, bla.</p></td></tr>
       <tr><td class=overborder><h6>This space for rent.</h6></td></tr>
      </table>
     </td></tr>
    </table>
    </td>

    <td>
     <table colspan=3 width=100% cellpadding=20>
     
      <tr><td>
       <table class=boxed>
        <tr><td class=underborder><h4>Random Quote of the Pageload</h4></td></tr>
   <tr><td>
    <h6>this is supposed be <em>funny</em></h6>
    <blockquote>Bla, bla, bla.</blockquote><br>
   </td></tr>
   <tr><td class=overborder><h6>Source: N/A</h6></td></tr>
       </table>
      </td></tr>
     
      <tr><td>
       <table class=boxed>
        <tr><td class=underborder><h4>A random box on the side</h4></td></tr>
   <tr><td>This is the contents</td></tr>
   <tr><td class=overborder><h6>And this is the footer</h6></td></tr>
       </table>
      </td></tr>
     
     </table>
    </td></tr>
   
  </table>
   
 </body>
</html>


And the CSS:
body {
background-color: black;
color: white;
font-family: "bitstream vera sans", "sans serif", tahoma, verdana, sans-serif;
}

a { text-decoration: none; }
a:link { color: #007FFF; }
a:visited { color: #005FBF; }
a:hover { color: #2FBFFF; }
a:active { color: #2FBFFF; }

*.navigation {
border-style: solid;
border-bottom-width: 2px;
border-top-width: 2px;
border-left-width: 0px;
border-right-width: 0px;
border-color: #0070E0;
color: #0070E0;
}

*.navigation:hover {
border-style: solid;
border-bottom-width: 2px;
border-top-width: 2px;
border-left-width: 0px;
border-right-width: 0px;
border-color: #2FBFFF;
color: #2FBFFF;
}

*.boxed {
width: 100%;
border-style: solid;
border-width: 2px;
border-color: #0070E0;
}

*.boxed:hover {
width: 100%;
border-style: solid;
border-width: 2px;
border-color: #2FBFFF;
}

*.overborder {
width: 100%;
border-style: solid;
border-top-width: 2px;
border-left-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-color: #0070E0;
}

*.overborder:hover {
width: 100%;
border-style: solid;
border-top-width: 2px;
border-left-width: 0px;
border-right-width: 0px;
border-bottom-width: 0px;
border-color: #2FBFFF;
}

*.underborder {
width: 100%;
border-style: solid;
border-bottom-width: 2px;
border-left-width: 0px;
border-right-width: 0px;
border-top-width: 0px;
border-color: #0070E0;
}

*.underborder:hover {
width: 100%;
border-style: solid;
border-bottom-width: 2px;
border-left-width: 0px;
border-right-width: 0px;
border-top-width: 0px;
border-color: #2FBFFF;
}
Last edited by Illissius on Thu Sep 09, 2004 2:55 pm, edited 1 time in total.
Work is punishment for failing to procrastinate effectively.
last.fm profile
 
Kevin
Administrator
Posts: 6581
Joined: Thu Dec 27, 2001 7:00 pm
Location: Minneapolis, MN
Contact:

Thu Sep 09, 2004 2:10 pm

Moved to the Developer Forum.

Kevin
 
mattsteg
Gerbil God
Posts: 15782
Joined: Thu Dec 27, 2001 7:00 pm
Location: Applauding the new/old variable width forums
Contact:

Thu Sep 09, 2004 2:20 pm

Your use of tables seems sort of odd, in particular how you've set up your colspans and such. I'm highly predisposed against tables for layout, if only because they are meant to hold tabular data. I prefer pure css layouts, although you do need to fight IE's crappy renderer a tad more with them. If you really want to use nested tables, set the width of the cells in the outer table to position and size inner tables.
...
 
just brew it!
Administrator
Posts: 54500
Joined: Tue Aug 20, 2002 10:51 pm
Location: Somewhere, having a beer

Thu Sep 09, 2004 2:25 pm

mattsteg wrote:
Your use of tables seems sort of odd, in particular how you've set up your colspans and such. I'm highly predisposed against tables for layout, if only because they are meant to hold tabular data.

Aww, you're no fun! :wink:
Nostalgia isn't what it used to be.
 
Jon
Gerbil Elite
Posts: 980
Joined: Sat Feb 14, 2004 7:44 pm
Location: -Alberta-

Thu Sep 09, 2004 2:41 pm

paste ALL the html including the header

EDIT: as in the <head> bit
Image
-Playing shooters on a console is like doing brain surgery with an ice-cream scoop-
 
Illissius
Graphmaster Gerbil
Topic Author
Posts: 1116
Joined: Thu Oct 23, 2003 5:25 am
Location: Hungary
Contact:

Thu Sep 09, 2004 2:53 pm

I'm pretty new to this whole HTML thing... originally I was exactly trying to do it with CSS, but it turned out all kinds of ugly (wish I had a screenshot, it was really bad), and I resigned myself to using tables. How would I accomplish it with CSS?
I only read w3c.org's CSS tutorial, and picked up HTML from various places, so if I did something stupid or there's things I should sort of know, have no mercy.

Jon: I'll update the original post with the <head> once I press 'submit' on this... I more or less just copied it out of the source for TR's main page, for lack of any better ideas :o.
Work is punishment for failing to procrastinate effectively.

last.fm profile
 
steelcity_ballin
Gerbilus Supremus
Posts: 12072
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Thu Sep 09, 2004 3:02 pm

Illissius wrote:
I'm pretty new to this whole HTML thing... originally I was exactly trying to do it with CSS, but it turned out all kinds of ugly (wish I had a screenshot, it was really bad), and I resigned myself to using tables. How would I accomplish it with CSS?
I only read w3c.org's CSS tutorial, and picked up HTML from various places, so if I did something stupid or there's things I should sort of know, have no mercy.

Jon: I'll update the original post with the <head> once I press 'submit' on this... I more or less just copied it out of the source for TR's main page, for lack of any better ideas :o.


Macromedia dreamweaver is a dream. Download the free 30 day trial from http://www.macromedia.com. It will solve everything.
 
Yahoolian
Grand Gerbil Poohbah
Posts: 3577
Joined: Sun Feb 16, 2003 3:43 pm
Location: MD
Contact:

Thu Sep 09, 2004 3:05 pm

I agree with matt.

Take a look at this page for info on using CSS instead of tables.

How about to control how much of the screen each of them takes up horizontally? ie, I'd like to set one column to use the left 70% of the screen, and the other the remaining 30%.


Set the table widths to 70% and 30% respectively in the table tag.

<table width="70%">


Although I'd recommend using ems instead of % because setting a certain % may be too small or too big for the content, depending on how large/small the user's browser window and text size is.
See "Fluid layouts using % probably bad idea."
Last edited by Yahoolian on Thu Sep 09, 2004 3:10 pm, edited 1 time in total.
 
Kevin
Administrator
Posts: 6581
Joined: Thu Dec 27, 2001 7:00 pm
Location: Minneapolis, MN
Contact:

Thu Sep 09, 2004 3:06 pm

If you want to use CSS for positioning and layout, check out this guide:

http://www.brainjar.com/css/positioning/
Being right doesn't matter if no one listens.
 
Illissius
Graphmaster Gerbil
Topic Author
Posts: 1116
Joined: Thu Oct 23, 2003 5:25 am
Location: Hungary
Contact:

Thu Sep 09, 2004 3:10 pm

Yeah, I've got the widths fixed now... tried putting width=s just about everywhere except where I should've.

Thanks for the CSS links, I'll take a look at them.

Macromedia dreamweaver is a dream. Download the free 30 day trial from http://www.macromedia.com. It will solve everything.

They don't have that for Linux, do they? (I did check, but I couldn't find it with a quick lookaround, nor did I see any 'requires windows' thingies...) (Un)fortunately, that's what I'm currently using. And I sort of like doing things by hand.
Last edited by Illissius on Thu Sep 09, 2004 3:20 pm, edited 1 time in total.
Work is punishment for failing to procrastinate effectively.

last.fm profile
 
Yahoolian
Grand Gerbil Poohbah
Posts: 3577
Joined: Sun Feb 16, 2003 3:43 pm
Location: MD
Contact:

Thu Sep 09, 2004 3:18 pm

Image
 
Illissius
Graphmaster Gerbil
Topic Author
Posts: 1116
Joined: Thu Oct 23, 2003 5:25 am
Location: Hungary
Contact:

Sun Sep 12, 2004 11:23 am

Thanks a lot for the CSS links, I think I've got it just about perfect now 8), the site is still here.
I'm not sure I want to completely spam the thread into oblivion with source and screenshots; should I do it anyways, update the stuff in the original post, or what?

(p.s., if someone would post an IE6 screenshot (it supposedly doesn't handle CSS very well...) so I don't have to reboot into Windows for one, I'd be much obliged ;))
Work is punishment for failing to procrastinate effectively.

last.fm profile
 
Yahoolian
Grand Gerbil Poohbah
Posts: 3577
Joined: Sun Feb 16, 2003 3:43 pm
Location: MD
Contact:

Sun Sep 12, 2004 11:42 am

Looking good (in Firefox at least).

Here's an IE6 screenshot:
Image

Looks a little broken, but still usable.
Last edited by Yahoolian on Sun Sep 12, 2004 11:59 am, edited 1 time in total.
 
Illissius
Graphmaster Gerbil
Topic Author
Posts: 1116
Joined: Thu Oct 23, 2003 5:25 am
Location: Hungary
Contact:

Sun Sep 12, 2004 11:54 am

Thanks. It does indeed look good enough, and yet at the same time bad enough that I can put in a 'Your browser is not standards compliant, and will not render this page correctly. Please download a standards compliant browser, such as one from the list below:' sort of page for IE users if I choose to... *ponders* ;)
Work is punishment for failing to procrastinate effectively.

last.fm profile
 
Illissius
Graphmaster Gerbil
Topic Author
Posts: 1116
Joined: Thu Oct 23, 2003 5:25 am
Location: Hungary
Contact:

Mon Sep 13, 2004 12:16 pm

Eh, what the hell.

HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
 <head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <meta http-equiv="Content-Language" content="en-us" />
  <meta name="description" content="This is Illissius's site." />
  <link rel="stylesheet" type="text/css" href="style/default.css" />
  <title>Illissius's site</title>
 </head>
 
 
 <body>
 
  <h1><a href="http://illissius.uw.hu">Illissius's site</a></h1>
  <h6 class="navigation"><a href="index.php">main</a> | <a href="news.php">news</a> | <a href="quotes.php">quotes</a> | <a href="links.php">links</a> | <a href="about.php">about</a></h6>
   
     
  <div class="leftcolumn">
   
   <div class="boxed">
    <h6 class="header">This is the header</h6>
    <div class="contents">
     <h3>This is the title</h3>
     <p>This is the contents</p>
    </div>
    <h6 class="footer">This is the footer</h6>
   </div><br />

   <div class="boxed">
    <h6 class="header">01:40, Sunday, September 12, 2004. by Illissius</h6>
    <div class="contents">
     <h3>Random post</h3>
     <p>Bla, bla, bla.</p>
    </div>
    <h6 class="footer">This space for rent.</h6>
   </div>
 
  </div>
 
       
  <div class="rightcolumn">
     
   <div class="boxed">
    <h4 class="header">Random Quote of the Pageload</h4>
    <div class="contents">
     <h6>this is supposed to be <em>funny</em></h6>
     <blockquote><p>Bla, bla, bla.</p></blockquote>
    </div>
    <h6 class="footer">Source: N/A</h6>
   </div><br />

   <div class="boxed">
    <h4 class="header">A random box on the side</h4>
    <div class="contents">
     <p>This is the contents</p>
    </div>
    <h6 class="footer">And this is the footer</h6>
   </div>
 
  </div>
   
 </body>
</html>




CSS:
body {
 background-color: black;
 color: white;
 font-family: "bitstream vera sans", "sans serif", tahoma, verdana, sans-serif;
}

a { text-decoration: none; }
a:link { color: #007FFF; }
a:visited { color: #005FBF; }
a:hover { color: #2FBFFF; }
a:active { color: #2FBFFF; }

*.navigation {
 border-style: solid;
 border-bottom-width: 2px;
 border-top-width: 2px;
 border-left-width: 0px;
 border-right-width: 0px;
 border-color: #0070E0;
 color: #0070E0;
 text-align: center;
}

*.navigation:hover {
 border-color: #2FBFFF;
 color: #2FBFFF;
}

*.leftcolumn {
 width: 66%;
 float: left;
 margin-left: 1%;
}

*.rightcolumn {
 width: 30%;
 float: right;
 margin-right: 1%;
}

*.boxed {
 border-style: solid;
 border-width: 2px;
 border-color: #0070E0;
}

*.boxed:hover {
 border-color: #2FBFFF;
}

*.boxed > *.contents {
 margin-left: 2%;
 margin-right: 2%;
}

*.boxed > *.contents > *:first-child {
 margin-top: 2%;
}

*.boxed > *.footer {
 border-style: solid;
 border-top-width: 2px;
 border-left-width: 0px;
 border-right-width: 0px;
 border-bottom-width: 0px;
 border-color: #0070E0;
 margin: 0px;
}

*.boxed:hover > *.footer {
 border-color: #2FBFFF;
}

*.boxed > *.header {
 border-style: solid;
 border-bottom-width: 2px;
 border-left-width: 0px;
 border-right-width: 0px;
 border-top-width: 0px;
 border-color: #0070E0;
 margin: 0px;
}

*.boxed:hover > *.header {
 border-color: #2FBFFF;
}




Opera:
Image


Konqueror:
Image

It renders just about the same in both, which is good. Now I'll get to making an actual site out of it with php...

I read the link on ems, but I couldn't think of any way to put them to good use - if I make the sidebar a given number of ems wide, which is the most appropriate application for it I can think of, it'll start to consume the majority of the screenspace as the screen gets smaller, which is not ideal. Also can't think of how to make the left column take up the remaining space and no more - they kept overlapping no matter what I did. I also tried playing around a bit with assigning width: Xem; and max-width: Y%;, but Opera wouldn't render it correctly and Konqueror downright mutilated it, not to mention that it'd result in big, ugly, empty spaces in the middle on large screens if it did render correctly. So I'll just stick to pure %s for now, it works well enough.
Work is punishment for failing to procrastinate effectively.

last.fm profile

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On