Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > how do I move my menu items??

Reply
Thread Tools

how do I move my menu items??

 
 
Mike
Guest
Posts: n/a
 
      11-11-2006
Hi folks, I'm a novice, I have a simple website and would like to move
my three menu items, About Us, Contact, and Buy Now both downward to be
centered with the picture in the middle and to the right to be closer
to this image. Any input would be greatly appreciated. Also, if you
see any flaws in coding feel free to comment. It's strict xhtml and
another thing I'm wondering is if it should be transitional. I've
posted the source code below, thanks much for any comments, I read them
all and appreciate them much even if I don't get a chance to thank you.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
/>
<title>Bottlepal - the fun gadget!</title>

<style type="text/css">
<!--
..style1 {font-family: "Comic Sans MS"}
..style6 {font-size: 18px}
..offset {
margin-right: 15%;
}
-->
</style>

</head>

<body>
<div style="text-align: center;"><img
src="http://i100.photobucket.com/albums/m16/mikesal3731/57b9272a.jpg"
alt="logo"/></div>
<hr size="4" color="FF0000" width="45%" align="center"
noshade="noshade" />

<table width="100%" border="0" cellpadding="0" cellspacing="0">

<tr>
<td width="15%" height="158" valign="top" class="style6"><p><span
class="style1"><a href="/AboutUs.html">About Us </a><br />
<br />
<a href="(E-Mail Removed)">Contact</a><br />
<br />
<a
href="http://ww6.aitsafe.com/cf/add.cfm?userid=88190363&product=Bottlepal
bottle opener&price=4.99"><strong>Buy Now</strong></a></span></p>
<p align="center">&nbsp;</p></td>
<td width="85%" valign="top" class="style6"> <span
style="text-align: center;"><div align="center"><img class="offset"
src="http://i100.photobucket.com/albums/m16/mikesal3731/bottlepalRED.jpg"
alt="bottle opener" /></div></span>
<div align="right"><img
src="http://www.bottlepal.com/tinc?key=hQRG3RlG" alt="Hit Counter"
width="87" height="32" align="center"/>
</div>
</td>
</tr>
</table>
</body>
</html>

 
Reply With Quote
 
 
 
 
Ben C
Guest
Posts: n/a
 
      11-11-2006
On 2006-11-11, Mike <(E-Mail Removed)> wrote:
> Hi folks, I'm a novice, I have a simple website and would like to move
> my three menu items, About Us, Contact, and Buy Now both downward to be
> centered with the picture in the middle


Where it says 'valign="top"' on the <td> with the links in, change "top"
to "middle".

> and to the right to be closer to this image.


You've set the width of the whole table to 100%, and the widths of the
two cells to 15% and 85%.

This is what's defining how close the text is to the image.

First thing, you don't need to set all three values. Leave the table as
width 100%, and only set a percentage on one of the two cells. The
browser will work out the rest.

If you want the text closer to the image, make the table a bit narrower
(90% or 80% rather than 100%) and centre the table in the page (now that
it doesn't take up all its width) by giving it margin: 0 auto.

It depends what effect you want. The width of the image is given, it
doesn't change with browser window size, so if you give the cell it's in
a width in pixels rather than as a percentage, and just leave both the
table and the other cell with automatic widths, you should always get
the bottle in the middle of the page and the menu a constant offset from
its left.

> Any input would be greatly appreciated. Also, if you
> see any flaws in coding feel free to comment.
> It's strict xhtml and
> another thing I'm wondering is if it should be transitional. I've
> posted the source code below, thanks much for any comments, I read them
> all and appreciate them much even if I don't get a chance to thank you.
>
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
><html xmlns="http://www.w3.org/1999/xhtml">
><head>
><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"
> />
><title>Bottlepal - the fun gadget!</title>
>
><style type="text/css">
><!--
> .style1 {font-family: "Comic Sans MS"}
> .style6 {font-size: 18px}
> .offset {
> margin-right: 15%;
> }
> -->
></style>
>
></head>
>
><body>
><div style="text-align: center;"><img
> src="http://i100.photobucket.com/albums/m16/mikesal3731/57b9272a.jpg"
> alt="logo"/></div>
><hr size="4" color="FF0000" width="45%" align="center"
> noshade="noshade" />
>
><table width="100%" border="0" cellpadding="0" cellspacing="0">
>
><tr>
> <td width="15%" height="158" valign="top" class="style6"><p><span
> class="style1"><a href="/AboutUs.html">About Us </a><br />
> <br />
> <a href="(E-Mail Removed)">Contact</a><br />
> <br />
> <a
> href="http://ww6.aitsafe.com/cf/add.cfm?userid=88190363&product=Bottlepal
> bottle opener&price=4.99"><strong>Buy Now</strong></a></span></p>
> <p align="center">&nbsp;</p></td>
><td width="85%" valign="top" class="style6"> <span
> style="text-align: center;"><div align="center"><img class="offset"
> src="http://i100.photobucket.com/albums/m16/mikesal3731/bottlepalRED.jpg"
> alt="bottle opener" /></div></span>
><div align="right"><img
> src="http://www.bottlepal.com/tinc?key=hQRG3RlG" alt="Hit Counter"
> width="87" height="32" align="center"/>
></div>
></td>
> </tr>
></table>
></body>
></html>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

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

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Writing move constructors and move assignment Andrew Tomazos C++ 2 12-12-2011 01:45 PM
Menu causes Panel to move/resize SR ASP .Net 2 06-26-2006 07:17 PM
I am trying to move spaces to a weblistbox and when I move them... Eduardo78 ASP .Net Web Controls 0 11-03-2005 06:06 PM
Jump Menu (DropDown Menu) in ASP.net. Can someone help me out? Miguel Dias Moura ASP .Net 3 04-03-2004 08:17 AM



Advertisments