![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Jun 2006
Posts: 12
Rep Power: 0
![]() |
Fixed boxes, how?
Hello all! I'm still fairly new to the programming world and I'm still learning HTML. I have a pretty basic concept on how to use html, but there are something’s that I'm currently having problems with.
I'm trying to figure out how to create a fixed box that will go down the left side of my website from just below h1 down to the bottom of the page. I have been doing a lot of searching and cannot find what I'm looking for. Furthermore, I'm also wondering if it is possible to put this in a CSS too. Can anyone give me any helpful suggestions or a shove in the right direction? Thanks head of time!
__________________
rocking the newb status! |
|
|
|
|
|
#2 |
|
Programming Guru
![]() Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5
![]() |
In your CSS for the element you want to have fixed:
css Syntax (Toggle Plain Text)
css Syntax (Toggle Plain Text)
More on the hack here and here. |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Jun 2006
Posts: 12
Rep Power: 0
![]() |
Arevos, thank you for the info. That's what I've been looking for. Both websites are excellent forms of info for this. Thanks a ton!
__________________
rocking the newb status! |
|
|
|
|
|
#4 |
|
Unverified User
Join Date: Aug 2005
Location: none
Posts: 146
Rep Power: 0
![]() |
Make your <div> and in the stylesheet give it float:left, a small margin-right, and a small width. Be sure to use percents for the latter two so it works on different resolutions. For the <div> that the rest of the page is on, make it 100%-(the width of the navigation+margin). Of course this doesn't work in IE without some silly hack.
__________________
Warning: My posts may change (dramatically) within the first 15 minutes they're posted. Got 'Nux?—GNU/Linux and other free software support. It's GNU/Linux, not just Linux. |
|
|
|
|
|
#5 |
|
I eat cake for breakfast.
![]() ![]() ![]() ![]() Join Date: Jul 2004
Location: In my box.
Posts: 4,434
Rep Power: 9
![]() |
If you use XHTML 1.0 Strict, you'll need to set the height property of html to 100% as well, as it contains body. Apparently that's a feature, not a bug.
![]() |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Jun 2006
Posts: 12
Rep Power: 0
![]() |
Thanks for the info guys. I just got done reading some info on that A Thing, even learned how to get around the IE problem from the websites Arevos gave me and HERE. Ooble I think I'm going to stick with XHTML 1.0 Transitional, seems to be the way to go by majority
.
__________________
rocking the newb status! |
|
|
|
|
|
#7 |
|
Newbie
Join Date: Jun 2006
Posts: 12
Rep Power: 0
![]() |
Well I finally finished what I started the other day. For my first build I don't think I did to bad. I'm open for suggestions and constructive criticism. If you like, check it out here. Thanks again for the help guys.
__________________
rocking the newb status! |
|
|
|
|
|
#8 |
|
Banned
![]() ![]() |
It's a good start, but I'd like to suggest a few things.
In your banner, due to all the contrasting colors, you need to put some sort of border on your font, so it doesn't blend in with the light colors. You would need to put the font in to the banner to do that (not just in the HTML). You can do that in Photoshop quite easily. You have dark black font on a dark blue background. It makes the font very difficult to read, when that is what you want people to be looking at most importantly. You should have some contrast to act as a backing on the text beside each picture, to separate it aesthetically from the pictures, and make it stand out. <hr> seperators aren't really used anymore. It's much more effective to create a border using <div> tags, which allows you to control more specific attributes than a plain <hr>. The navbar could use an unordered list (<ul>), combined with CSS, to achieve a more stable navigation with hover graphics and the works. Right now the idea of it being inside a table, and the font growing larger seems a little novice to me. Other then that, it's a good start. If you're too busy to keep learning, there are always people who'd be willing to remake a website for low prices. |
|
|
|
|
|
#9 |
|
Newbie
Join Date: Jun 2006
Posts: 12
Rep Power: 0
![]() |
Sane, thanks for the suggestions and comments. I will start looking into what you had to say. The bgcolor is getting changed real soon, along with the #mainheader
. If you get a chance send me a pm some info on what you mean by a ul, css, and hover graphics. Never to busy to learn .
__________________
rocking the newb status! |
|
|
|
|
|
#10 |
|
Banned
![]() ![]() |
I would PM this, but it's useful stuff to know. Some other people might want to read this and pick up on it.
It's basically making use of lists in a different manner. I found out about this from the w3 website and ColdDeath (another member here). If you'd like to see an example: www.jammersbase.com ... the nav-bar at the top is an unordered list. It uses "float:left" to make it tile horizontally. Although it can easily be modified to tile vertically by removing "float:left" and playing with the widths. And here is the relevant stuff: HTML <div id="navbar" align="center">
<ul id="nav-menu">
<li id="active"><a href="/" id="current-page">Home</a></li>
<li><a href="/notices">Notices</a></li>
<li><a href="/forum">Forums</a></li>
<li><a href="/faq">FAQ</a></li>
<li><a href="/downloads">JbE</a></li>
<li><a href="/members">Members</a></li>
<li><a href="/guilds">Guilds</a></li>
<li><a href="/compare">Compare</a></li>
<li><a href="/rankings">Rankings</a></li>
<li><a href="/songlist">Songs</a></li>
<li><a href="/albumlist">Albums</a></li>
<li><a href="/credit">Credit</a></li>
</ul>
</div>CSS css Syntax (Toggle Plain Text)
As you can see, the html is very straight forward. It's just a bunch of items wrapped in a <ul>. However, the CSS is where the tricky stuff comes in to play, and the magic occurs. If you're interested in getting it to tile vertically, remove the "float:left", and set the width of each item to the same as the width of the entire navbar. It will require some playing around with, and some frustration. But I think it's worth it. It's all up to you. ![]() |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Sound Fixed! | Kilo | Coder's Corner Lounge | 12 | Jun 13th, 2006 7:34 AM |
| WMI Config Settings Fixed for SQL | john Wesley | Visual Basic .NET | 0 | Jun 8th, 2006 7:42 AM |
| Rich Text Boxes | brokenhope | Visual Basic | 1 | Sep 7th, 2005 3:34 PM |
| Text Boxes | fox123 | Visual Basic | 6 | Jun 5th, 2005 3:31 PM |
| How do I make a fixed window? | dmorales | HTML / XHTML / CSS | 5 | Apr 25th, 2005 11:14 AM |