Computer Webmaster Gaming Console Graphics Forum

Welcome to the Computer Webmaster Gaming Console Graphics Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

MK PitStop Main Earn $25 Earn Money Posting Extras Members Blogs Image Hosting User Pages
Go Back   Computer Webmaster Gaming Console Graphics Forum > Webmaster Forum > Website Coding > CSS
Register FAQ/Rules Become A V.I.P. Member Search Today's Posts Mark Forums Read

CSS CSS styling code help for your website, CSS is like art and what makes your website look professional.

Google
Reply
 
LinkBack Thread Tools Display Modes
Old 07-01-2007, 1:17 PM   #1
Bill Marriott
 
Bill Marriott's Avatar
 
Posts: n/a
My Photos: (0)

Banked:
MK Cash: $

I am Worth:
MK Cash: $
Donate

Recent Blog: None

Default Getting Started with CSS: Roughing Out a Nav Bar

Hi everyone,

As the subject line suggests, I'm just getting started with using CSS. The
specific application I have in mind is a custom WordPress theme. When I'm
totally done, I'd like it to look like this:

http://wjm.org/csshelp/wp-template-concept.png

The idea is that the nav bar at the top expands dynamically to accommodate
the text of the main pages and their child pages (if they exist).

So my first baby-step is to try to get the bigger part of the nav bar to
look the way I expect. Already I've run into a lot of trouble! Here's what I
wrote so far:

=================================

<html>
<head>
<style type="text/css" media="screen">
<!--
..navcontainer
{
padding: 3px 10px 17px 10px;
margin: 0px;
font-family: Arial Black, Verdana, Arial, Helvetica, sans-serif;
background-position: center;
background-image: url(images/major-nav-back.png);
background-repeat: no-repeat;
font-size: 18px;
word-spacing: 10px;
}
-->
</style>
</head>

<body>
<p>X</p>

<img src="images/major-nav-left.png" width="18" height="48" />
<span class="navcontainer" >PageOne PageTwo PageThree PageEight</span>
<img src="images/major-nav-right.png" width="18" height="48" />

<p>X</p>
</body>
</html>

=================================

You can see the result of this at:

http://wjm.org/csshelp/main-nav-01.html

The brushed-aluminum background is 48 pixels high. There is a left cap and a
right cap. The objective is for the caps to meet up with the middle bar,
which would shrink/expand horizontally to accommodate the text. However, you
can see that I'm totally off the mark so far:

1) I haven't been able to figure out the CSS necessary to properly align the
middle section with the endcaps. I can push the endcaps DOWN by adding

style="position: relative; top: 24px"

to each of the img tags, but that seems like a kludge, because it puts
everything below the actual starting position of the graphic and leaves
white space at the top. Putting

position: relative; top: -24px

into the navcontainer style section has no effect. What is the right way to
do this?

2) There's a gap between the caps and the middle section. How do I get rid
of this? I tried putting display: inline in a few places, but the best I can
do is to get rid of the gap on the right.

3) The graphic is 48px high; the text is 18px high. But my margins total
only 20 px on the top and bottom. This seems to be what I have to set it to
for it to work properly, but what is using up the other 10px?

4) I want to use Arial Black because that is an almost universal font; but
if it's not present I want to degrade down to Verdana and so on... but
specifically I want to go from Arial Black to Verdana BOLD, then Arial BOLD,
then Helvetica BOLD... not the plain versions of those fonts. How to specify
this properly?

5) The background image (which you will notice is slightly brighter in the
middle) is currently centered. Ideally I would want it to STRETCH to fill
the horizontal space occupied by the menu text. That way, the end caps will
mate more perfectly with the pattern and I won't have to make an excessively
wide background graphic. I haven't found a way to specify this in CSS -- am
I missing something?

Obviously I'm clueless on some key concepts, but hopefully once I get past
some of these starting hurdles I'll pick up speed. Thanks in advance for any
help...

- Bill


 
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
Featured Websites
Free Space
Free Space
Free Space Free Space
Reply
Tags: , , , , ,




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting started with GPS Dave Patton GPS 0 06-25-2007 10:48 PM
How to get started? Tasha Software Programming 0 06-12-2007 8:39 PM
Getting Started John Marks Ebay Technical Questions 0 05-31-2007 12:16 PM
JUST STARTED! Fam. Sundberg Building An Internet Business 0 05-29-2007 12:44 AM


Featured Websites




All times are GMT +1. The time now is 7:16 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.0.0
Cheap Computers
MK PitStop Copyright 2005 - 2008

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98