473,802 Members | 1,988 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2139
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_lef t.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">P rospective Students</a></td>
<td id="toplinks" width="141" align="center" height="21"><a href="../current/index.htm" target="_top">C urrent Students</a></td>
<td id="toplinks" width="142" align="center" height="21"><a href="../alum_parent/index.htm" target="_top">A lumni &amp; Parents</a></td>
<td id="toplinks" width="140" align="center" height="21"><a href="../corporate/index.htm" target="_top">C orporate 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
3273
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 scripts working on a new server with the most recent version of PHP. I've pretty much taken care of all the various errors that were popping up. Most only pointed out out non-fatal undefined or assumed variables. I've been able to cure most of...
1
1957
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 past 2 weeks now i give up and call for help. Please if anyone can gide me through i will be so grateful!! I have pasted my code below
0
1705
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 browser that Hotmail does not support. If you continue to use your current browser software we cannot guarantee that Hotmail will work correctly for you". Please help, this is very annoying. I have been searching for help on
12
2139
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 cout << "Please Enter First number: ";
7
3618
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> </head> <style type="text/css">
5
3004
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 <<<<<<<<<<<<<<CODE>>>>>>>>>>>>>>>> <html>
17
2038
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 trace the title and price of the book automatically. The system should check whether the book is in the stock or not. If it is not, please let the user to enter again. (b)Allow a customer to buy more than one item from the bookshop.
7
3301
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 I believe if it's solved, the remaining stuff is easy... my full program until now is here: http://www.geocities.com/tom4_h4wk/progmail.zip the problem is the segmentation fault when main trys to run leficheiro.c.... the *.c2 files are the...
23
3294
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 to create certain textboxes, labels, and combo boxes? Any ideas would be appreciated. Thanks
2
1546
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 there. I enabled XML documentation file under build properties and have recompiled my program but still I have nothing. What am I doing wrong? -- -ScottRadDev
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10538
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10305
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10285
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7598
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5494
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2966
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.