473,378 Members | 1,134 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Help please

While reading "Eric Myer on CSS" I decided it was time to replace the
buttons on my page (which were graphics) with some CSS "buttons" but I
hit some snags.

The first set of buttons I replaced seem to be working great, these are
the buttons on the left side, the main navigation buttons. But the four
buttons at the top (Prospective students, Alumni, Current Students,
Corporate) are not working as well as I'd hoped.

I'm getting some unwanted margins, and white margins that I can't seem
to get rid of. It's kind of hard to explain where they are but the best
way to explain it when you see it is that there should be no white
anywhere, except for the very bottom, under the buttons themselves,
about 13px high of white space. Don't worry about the top white space
and the left white space.

There is unwanted space right above the buttons also, about 6 px worth.
This is the file I'm talking about.
http://business.aem.cornell.edu/test/top_sub.htm

It's part of this site:

http://business.aem.cornell.edu/

The top buttons on this URL are the old graphic buttons. I'm fairly new
to CSS so be kind! On a mac IE 5 it looks pretty good, but on a PC IE 5
is where it looks bad, and that is of course what I'm designing for.

Thanks for any help, I hope I explained this well.

Steve
Jul 20 '05 #1
2 2108
Steve K <sm***@cornell.edu> wrote:
While reading "Eric Myer on CSS" I decided it was time to replace the
buttons on my page (which were graphics) with some CSS "buttons" but I
hit some snags.

The first set of buttons I replaced seem to be working great, these are
the buttons on the left side, the main navigation buttons. But the four
buttons at the top (Prospective students, Alumni, Current Students,
Corporate) are not working as well as I'd hoped.

I'm getting some unwanted margins, and white margins that I can't seem
to get rid of. It's kind of hard to explain where they are but the best
way to explain it when you see it is that there should be no white
anywhere, except for the very bottom, under the buttons themselves,
about 13px high of white space. Don't worry about the top white space
and the left white space.

There is unwanted space right above the buttons also, about 6 px worth.
This is the file I'm talking about.
http://business.aem.cornell.edu/test/top_sub.htm td#toplinks a {
display: block;
text-decoration: none;
border-right: 1px solid rgb(60%, 27%, 9%);
border-left: 1px solid rgb(100%, 57%, 39%);
margin: 0;
font: bold 11px arial, verdana, sans-serif;
Text sized in pixels is a bad idea as IE user's will not (easily) be
able to resize it.
color: white;
padding: 5px 5px 5px 5px;
background: rgb(82%, 36%, 15%)
}
<table width="758" border="0" style="margin: none;" cellspacing="0" cellpadding="0">
Should be margin: 0; not margin: none;

Now you've told the table to be 758 pixels wide.
<tr>
<td id="toplinks" width="161" align="center" height="21" >
A 165 pixel wide image in a 161 pixel wide cell?
<img src="../art/top_buttons_left.gif" width="165" height="21"></td>
<td id="toplinks" width="161" align="center" height="21">
id should be unique. Use class is you want to assign the same styles
to multiple elements.

And what happens if the user's text size is larger than 21 pixels?
<a href="../prospective/index.htm" target="_top">Prospective Students</a></td>
<td id="toplinks" width="141" align="center" height="21"><a href="../current/index.htm" target="_top">Current Students</a></td>
<td id="toplinks" width="142" align="center" height="21"><a href="../alum_parent/index.htm" target="_top">Alumni &amp; Parents</a></td>
<td id="toplinks" width="140" align="center" height="21"><a href="../corporate/index.htm" target="_top">Corporate Visitors</a></td>
</tr>
</table>


The widths on those cells are 161 + 161 + 141 + 142 + 140 = 745, even
allowing for the extra four pixels forced in there by the image that's
still nine pixels short of the width of the table.

The height is also wrong. You've set the font size to 11px so the line
height will probably be 14 pixels, plus 5 pixels top and bottom
padding makes these links 24 pixels tall. Taller then the 21 pixels
specified in your table cells and given by your image.

Personally I would scrap the tables and use a more flexible layout.
But for starters you can change your styles to :
td.toplinks a {
display: block;
text-decoration: none;
border-right: 1px solid rgb(60%, 27%, 9%);
border-left: 1px solid rgb(100%, 57%, 39%);
height: 100%;
margin: 0;
font-weight: bold;
font-size: 70%;
font-family: sans-serif;
color: white;
padding-top: 4px;
background: rgb(82%, 36%, 15%)
}

Make the width of that first cell 165 and delete the other cell
widths.

That will get rid of your excess white space (at least until the user
makes his text size larger).

The red space between the upper image (BTW alt="site header" is
useless, it should be alt="Cornell University Undergraduate Business
Program") and the navigation is due to the line breaks between the
<img> tag and the </td> tag. Move the <map> outside the table and
close up all the spaces inside it.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #2
In article <ca********************************@4ax.com>, Steve Pugh
<st***@pugh.net> wrote:

<help snipped>

Thank you very much. The fixed file is up now and it's working like I
wanted it to. Now it's on to figuring out how to do the same thing
without tables.

Thanks again
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: laurie | last post by:
Hi all, I'm trying to help out a friend who has inherited a client with a PHP shopping cart application. Neither of us know PHP, but I've been muddling my way through, trying to get these old...
1
by: the_proud_family | last post by:
HELP ME PLEASE!! my email is the_proud_family@yahoo.com I can't get the ball to go up right side and then I need it to turn around and keep turning until velocity=0 I have been at it for the ...
0
by: Kurt Watson | last post by:
I’m having a different kind of problem with Hotmail when I sign in it says, "Web Browser Software Limitations Your Current Software Will Limit Your Ability to Use Hotmail You are using a web...
12
by: Christo | last post by:
borland c++ 5.01 character constant must be one or two characters long get this when compiling my first c++ program can anyone out there help? it is highlighting this line as the problem ...
7
by: x muzuo | last post by:
Hi guys, I have got a prob of javascript form validation which just doesnt work with my ASP code. Can any one help me out please. Here is the code: {////<<head> <title>IIBO Submit Page</title>...
5
by: Craig Keightley | last post by:
Please help, i have attached my page which worksin IE but i cannnot get the drop down menu to fucntion in firefox. Any one have any ideas why? Many Thanks Craig ...
17
by: JT | last post by:
Help me the following C++ question: Write a program to help a local bookshop automate its billing system. The program should do the following: (a)Let the user enter the ISBN, the system will...
7
by: tyler_durden | last post by:
thanks a lot for all your help..I'm really appreciated... with all the help I've been getting in forums I've been able to continue my program and it's almost done, but I'm having a big problem that...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
2
by: =?Utf-8?B?U2NvdHRSYWREZXY=?= | last post by:
I'm creating a doc project for my c# program. I've done this before but this time sonething is wrong. I build my doc project and is succeeds but when I open the help file, there is no documentation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.