|
Author |
Message |
Gazdaman |
This post is not being displayed .
|
Gazdaman I did a trackday!!!
Joined: 12 Aug 2004 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
FreshAL |
This post is not being displayed .
|
FreshAL Sir Crashalot
Joined: 04 Jul 2005 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
FreshAL |
This post is not being displayed .
|
FreshAL Sir Crashalot
Joined: 04 Jul 2005 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
Gazdaman |
This post is not being displayed .
|
Gazdaman I did a trackday!!!
Joined: 12 Aug 2004 Karma :
|
Posted: 19:05 - 08 Feb 2006 Post subject: |
|
|
CSS
Code: |
BODY {background: #2B2B2B; margin: 0px;}
A:link {color: #CDCDCD}
A:visited {color: #B3B3B3}
H1 {
font-size: 10pt;
font-family: arial;
font-weight: normal;
color: #2B2B2B;}
H2 {
font-size: 12pt;
font-family: arial;
font-weight: bold;
color: white}
H3 {
font-size: 10pt;
font-family: arial;
font-weight: bold;
color: white}
H4 {
font-size: 12pt;
font-family: arial;
font-weight: normal;
color: white}
H5 {
font-size: 10pt;
font-family: arial;
font-weight: normal;
color: white}
img { border-width: 0px }
div.main {
border: 0px;
padding: 0px;
margin: 0px;
left: 50px;
right: 50px;
color: #fff;
width: 1050px;
height: 100%; }
div.header-top {
position: absolute;
width: 1050px;
border: 0px;
padding: 0px;
margin: 0px;
height: 20px;
margin-top: 0px;
right: 50px;
left: 50px;
background-image:url('images/tabbak1.gif'); }
div.header-logo {
position: absolute;
width: 1050px;
border: 0px;
padding: 0px;
margin: 0px;
height: 95px;
right: 50px;
left: 50px;
background: #404040;
text-align: center; }
div.header-bottom {
position: absolute;
width: 1050px;
border: 0px;
padding: 0px;
margin: 0px;
height: 20px;
right: 50px;
left: 50px;
top: 115px;
background-image:url('images/tabbak1.gif'); }
div.content-bg {
position: absolute;
top: 135px;
height: 95%;
left: 50px;
width: 1050px;
border: none;
background-color: #383838; }
div.left-menu {
position: absolute;
height: 90%;
top: 135px;
left: 50px;
width: 200px;
float: left;
border: none;
border-width: 0px;
border-color: #2B2B2B;
background-color: #000; }
div.left-menu-links {
position: absolute;
height: 98%;
top: 1px;
margin-bottom: 5px;
left: 3px;
width: 180px;
padding: 5px;
border: solid;
border-width: 2px;
border-color: #2B2B2B;
background-color: #404040; }
div.link-box {
position: relative;
top: 0px;
left: -1px;
width: 168px;
padding: 5px;
border: solid;
border-width: 2px;
border-color: #595959;
background-color: #2B2B2B; }
div.content {
position: absolute;
top: 135px;
width: 624px;
border: solid;
padding: 10px;
margin-left: 250px;
margin-right: 250px;
border-width: 3px;
border-color: #2B2B2B;
background-color: #595959; }
div.right-menu {
position: absolute;
height: 90%;
top: 135px;
right: 33px;
width: 200px;
border: none;
border-width: 3px;
border-color: #2B2B2B;
background-color: #000;}
div.right-menu-links {
position: absolute;
height: 98%;
top: 1px;
margin-bottom: 5px;
right: 3px;
width: 180px;
padding: 5px;
border: solid;
border-width: 2px;
border-color: #2B2B2B;
background-color: #404040; }
div.link-box {
position: relative;
top: 0px;
left: -1px;
width: 168px;
padding: 5px;
border: solid;
border-width: 2px;
border-color: #595959;
background-color: #383838; } |
HTML
Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Gaz-racing.co.uk - Motorcycle trackday reports/Rebuilds</title>
<link rel="stylesheet" href="gaz-racing.css" type="text/css" />
</head>
<body>
<div class="main">
<div class="header-top"></div><br>
<div class="header-logo"><img src="images/logo.jpg" alt="gaz-racing logo" /></div><br />
<div class="header-bottom"></div><br>
<div class="content-bg"></div>
<div class="left-menu">
<div class="left-menu-links">
<div class="link-box">link 1
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
</div>
</div><br>
<div class="right-menu">
<div class="right-menu-links">
<div class="link-box">link 1
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
<div class="link-box">link 2
</div>
</div>
</div><br>
<div class="content"><p>Lots of text which all has spaces and aren't stupidly long words that might spread my div out across whatever.</p></div>
</div>
</body>
</html> |
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
Gazdaman |
This post is not being displayed .
|
Gazdaman I did a trackday!!!
Joined: 12 Aug 2004 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
Dom |
This post is not being displayed .
|
Dom World Chat Champion
Joined: 06 Sep 2004 Karma :
|
Posted: 19:53 - 08 Feb 2006 Post subject: |
|
|
Regarding the '100% height' issue, CSS isn't that simple when it comes to specifying a % height. What I would suggest would be a 'faux columns' based design which basically consists of setting a background image for the <body> tag which contains say a 1px high image which is centered on the page and looks like columns.
Sorry if I'm not very clear, I'm not entirely with it atm. Have a look at this link, and hopefully it will help: https://www.alistapart.com/articles/fauxcolumns/
For an example on a site I've done have a look at www.just*removethis*ski.net . The column at the right side of the page is only as high as its content, but the <body> background image is basically the background image for that column, aligned to the right of the page and repeating vertically. The image: www.just*removethis*ski.net/wp-content/themes/justski/images/sobg.gif
HTH... it probably doesn't but I'll have another go when I'm more awake. ____________________ Photos and that |
|
Back to top |
|
You must be logged in to rate posts |
|
|
Gazdaman |
This post is not being displayed .
|
Gazdaman I did a trackday!!!
Joined: 12 Aug 2004 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
Dom |
This post is not being displayed .
|
Dom World Chat Champion
Joined: 06 Sep 2004 Karma :
|
Posted: 21:37 - 08 Feb 2006 Post subject: |
|
|
Personally, if that was my design I would not be coding it with absolute positioning or using any height attributes whatsoever, with the exception of height="Xpx" for the header bar.
All you need is a container div which is as wide as you want the overal design to be (% or px, or any other unit that takes your fancy), and for it to have the values margin: 0 auto which will then give you a centred block of X units wide.
I would then create 3 more divs. One being #left, one being #content and one being #right. I would set the #left div to say 100px wide and float: left. Then the #right div to 100px wide and float it to the right. Then for the #content div I'd just float either to the right or left with a width which would then fill in the centre area. This would be a lot less code and much more cross-browser friendly than your current setup, as well as having the benefit of being more or less dynamic to the content (absolute blocks will never move, so content can overlap, with some ugly results).
I haven't tested this code, but here's a rough idea of the way I'd do it and I know to be fine in all modern browsers:
HTML:
Code: |
<div id="container">
<div id="heading"><h1>My Website</h1></div>
<div id="leftsection">Links, whatever, here.</div>
<div id="content">Content with however many subsections you like could go here.</div>
<div id="rightsection">Right section here.</div>
</div>
|
CSS:
Code: |
#container {
width: 800px;
margin: 0 auto;
}
#heading {
width: 100%;
height: 200px;
}
#leftsection {
width: 150px;
float: left;
}
#content {
width: 500px;
float: left;
}
#rightsection {
width: 150px;
float: right;
}
|
Code like that or similar should achieve a 3 column design with a header, like yours, and be compatible with whatever you throw at it. If you were after a 'fluid' design as opposed to 'fixed' then some code changes would be needed, but nothing too severe. ____________________ Photos and that |
|
Back to top |
|
You must be logged in to rate posts |
|
|
Gazdaman |
This post is not being displayed .
|
Gazdaman I did a trackday!!!
Joined: 12 Aug 2004 Karma :
|
Posted: 22:06 - 08 Feb 2006 Post subject: |
|
|
appreciated my friend.
I suspected I was probably doing something wrong. I was trying to mimic my design on the current www.gaz-racing.co.uk as closely as I could, including the various shades and subset tables.
Gaz |
|
Back to top |
|
You must be logged in to rate posts |
|
|
Gazdaman |
This post is not being displayed .
|
Gazdaman I did a trackday!!!
Joined: 12 Aug 2004 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
Dom |
This post is not being displayed .
|
Dom World Chat Champion
Joined: 06 Sep 2004 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
Gazdaman |
This post is not being displayed .
|
Gazdaman I did a trackday!!!
Joined: 12 Aug 2004 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
Dom |
This post is not being displayed .
|
Dom World Chat Champion
Joined: 06 Sep 2004 Karma :
|
Posted: 12:07 - 09 Feb 2006 Post subject: |
|
|
If you're semi-serious about web design it's definitely worth it though, especially if you're looking for a job in the field. Although there are always bugs to be ironed out with all but the smallest projects, it does get a lot easier as you get used to it all, and you will find it as easy as tables in the end. ____________________ Photos and that |
|
Back to top |
|
You must be logged in to rate posts |
|
|
Suzuki |
This post is not being displayed .
|
Suzuki Roger
Joined: 03 May 2005 Karma :
|
Posted: 12:09 - 09 Feb 2006 Post subject: |
|
|
FWIW, I believe the problem you had at the top of this threat was due to the IE Box Model Bug.
Do a few googles for "Box Model Hack" ____________________ <Simple> no I'm shaven Jon
<Simple> it is a big enough hole.. I'll leave it now
Ride: 1999 Suzuki GSXR600 (yellow/black) IRC: Stats - Relationship Map |
|
Back to top |
|
You must be logged in to rate posts |
|
|
Gazdaman |
This post is not being displayed .
|
Gazdaman I did a trackday!!!
Joined: 12 Aug 2004 Karma :
|
|
Back to top |
|
You must be logged in to rate posts |
|
|
Old Thread Alert!
The last post was made 18 years, 107 days ago. Instead of replying here, would creating a new thread be more useful? |
|
|
|