I am in the process of creating a CSS tab style thing for my webpage.
I have everything as i wish except that i cannot center the damn thing
in the page. I am hoping someone out there can help. I am sure that
it is a silly mistake but i have been staring at it for so long i am
going stir-crazy!
I have tried 'text-align: center;' in most parts of the CSS and in the
div in the HTML but it does not like it.
This is my CSS:...
#pagetabs { float:left; width:100%; font-family: Verdana, Arial,
Helvetica, sans-serif; font-size:75%; line-height:normal;}
#pagetabs ul { margin:0; padding:0; list-style:none; }
#pagetabs li { float:left;
background:url( "../images/misc/tabright.gif") no-repeat right top;
margin: 0 1px 0 1px; padding:0; }
#pagetabs a { display:block; color:#5F68C3; text-decoration: none;
font-weight: bold; background:url( "../images/misc/tableft.gif")
no-repeat left top; padding:5px 15px;}
#pagetabs a:hover { color: #FF0000; }
#pagetabs #current {
background-image:url("../images/misc/curtabright.gif "); }
#pagetabs #current a {
background-image:url("../images/misc/curtableft.gif" ); }
/* Commented Backslash Hack hides rule from IE5-Mac \*/
#pagetabs a {float:none;}
/* End IE5-Mac hack */
and this is my HTML:...
<div id="pagetabs">
<ul>
<li id="current">< a href="#">Home</a></li>
<li><a href="show_diar y.htm" title="Link to the JM Optics show
diary">Show Diary</a></li>
<li><a href="#">Binocu lar Guide</a></li>
<li><a href="#">Binocu lar Help</a></li>
<li><a href="#">Site Help</a></li>
</ul>
</div>
I would much appreciate any help anyone can give me.
Cheers
David 5 2384
david hepworth wrote: I am in the process of creating a CSS tab style thing for my webpage. I have everything as i wish except that i cannot center the damn thing in the page. I am hoping someone out there can help. I am sure that it is a silly mistake but i have been staring at it for so long i am going stir-crazy!
I have tried 'text-align: center;' in most parts of the CSS and in the div in the HTML but it does not like it.
This is my CSS:...
#pagetabs { float:left; width:100%; font-family: Verdana, Arial, Helvetica, sans-serif; font-size:75%; line-height:normal;} #pagetabs ul { margin:0; padding:0; list-style:none; } #pagetabs li { float:left; background:url( "../images/misc/tabright.gif") no-repeat right top; margin: 0 1px 0 1px; padding:0; } #pagetabs a { display:block; color:#5F68C3; text-decoration: none; font-weight: bold; background:url( "../images/misc/tableft.gif") no-repeat left top; padding:5px 15px;} #pagetabs a:hover { color: #FF0000; } #pagetabs #current { background-image:url("../images/misc/curtabright.gif "); } #pagetabs #current a { background-image:url("../images/misc/curtableft.gif" ); }
/* Commented Backslash Hack hides rule from IE5-Mac \*/ #pagetabs a {float:none;} /* End IE5-Mac hack */
and this is my HTML:...
<div id="pagetabs"> <ul> <li id="current">< a href="#">Home</a></li> <li><a href="show_diar y.htm" title="Link to the JM Optics show diary">Show Diary</a></li> <li><a href="#">Binocu lar Guide</a></li> <li><a href="#">Binocu lar Help</a></li> <li><a href="#">Site Help</a></li> </ul> </div>
I would much appreciate any help anyone can give me.
Cheers
David
its not very oncvenient to make them float and then want them to center.
better make li { display: inline} and dont use floats. although this has
its drawbacks. btw 'text-align: center' only works on inline boxes.
if you insist on using floats, and you know the total with of your
tablist, you could use position: absolute; margin-left: -halfwidth_px
gl
martin
On 9 Apr 2005 02:41:01 -0700, dh*******@bigfo ot.com (david hepworth)
wrote: I have everything as i wish except that i cannot center the damn thing in the page.
[snipped lots of #¤%%%57*""=]
This is a FAQ that has been asked in this NG until boredom.
You are posting to Usenet news through one of the biggest search engines
in the world but you have no idea of how to use it to your own benefit?
A Google search for the quoted string "Center with CSS" gives 165 hits;
the info you are asking for is on the first couple of result pages.
--
Rex
Martin! wrote: its not very oncvenient to make them float and then want them to center. better make li { display: inline} and dont use floats. although this has its drawbacks. btw 'text-align: center' only works on inline boxes.
In IE5 or IE6 in quirksmode it also works on block level elements.
if you insist on using floats, and you know the total with of your tablist, you could use position: absolute; margin-left: -halfwidth_px
You mean so that the left part will be inaccessible if the width of
the visitor's window is less than the width of the tablist?
(plus it won't be centered as soon as the visitor changes their text
size)
--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Jan Roland Eriksson <jr****@newsguy .com> wrote in message news:<5e******* *************** **********@4ax. com>... On 9 Apr 2005 02:41:01 -0700, dh*******@bigfo ot.com (david hepworth) wrote:
I have everything as i wish except that i cannot center the damn thing in the page.
[snipped lots of #¤%%%57*""=]
This is a FAQ that has been asked in this NG until boredom.
You are posting to Usenet news through one of the biggest search engines in the world but you have no idea of how to use it to your own benefit?
A Google search for the quoted string "Center with CSS" gives 165 hits; the info you are asking for is on the first couple of result pages.
Cheers Martin,
I used to have it like you suggested but changed it for some reason
(can't remember why now). Nice to find people so ready to help.
Jan, this problem was quite specific and thanks to someone actually
looking they have solved my problem. Do you think i have not been
searching for the answer for a while? As my mum used to say, 'If you
can't say anything nice then don't say anything at all.' This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jeff Thies |
last post by:
I have a series of blocks that are float left that I need centered on
the page.
<div class="center" align="center">
<div style="width: 100 px;float: left">thumbnail 1</div>
<div style="width: 100 px;float: left">thumbnail 2</div>
<div style="width: 100 px;float: left">thumbnail 3</div>
</div>
|
by: Franois de Dardel |
last post by:
http://mapage.noos.fr/dardelf3/tintin/page3bits.html
Can I center the series of thumbnails horizontally in the pages _and_ keep
the "elastic arrangement" where the number of thumbnails adapts to the
width of the screen.
François de Dardel
http:/mapage.noos.fr/dardelf
Faber est suae quisque fortunae
Remove fourteen to reply
|
by: Jonah Bishop |
last post by:
I have a puzzling problem with centering text, and I'm hoping that someone
here can help me out. First of all, let me state that I am using XHTML 1.0
Strict and CSS for all layout purposes (no tables). My website consists of a
few, simple parts: a "container" DIV which is centered and 750 pixels wide,
a "sidebar" DIV which can be found along the left side of the container, and
a "content" DIV which fills up what's left of the right part of...
|
by: Haines Brown |
last post by:
I thought I had understood this issue and implemented a work around,
but now when I check on IE5, it is not working:
...
#IE-hack {
margin-left: auto;
margin-right: auto;
width: 20em;
text-align: center;
}
|
by: Ryan W Sims |
last post by:
I'm having trouble with centering in IE...
http://www.ryanwsims.com/koh/
The image should center over the text. It does in Firebird, but not in
IE for some reason. If you look at
http://www.ryanwsims.com/sd.php
everything's fine (i.e. centered)
| |
by: red |
last post by:
How do I center two side by side divs ?
I've been writing css pages for a while but there's one thing tha still
eludes me.
I can center a div with margin auto.
I can place two divs side by side with float.
But I can't center two side by side divs.
If I float them and give them auto margins, the auto margins are ignored.
If I wrap the two floated divs in another div, the two divs have no
|
by: Axel Siebenwirth |
last post by:
Hi,
as described at http://www.quirksmode.org/css/centering.html, I try to do
to centering with my site. I did exactly as told on that page but it only
seems to center horizontally.
My site is at http://www.up-2-d8.de/menu.html
Can you please take a look and see whether you can find anything I am
doing wrong?!
|
by: John Pote |
last post by:
1. Horizontal centering a <divin browser window.
The current trend seems to be to place page content in a fixed width area in the middle of the
browser window. How is this achieved? If I use a top level <divthen I can place it with CSS
attribute 'left:', but this is a fixed offset. Is it possible to have a <divcentered in the
browser window?
2. Verticle centering in <div>
|
by: Markus Ernst |
last post by:
Hello
This is a test example:
http://www.markusernst.ch/anthracite/
http://www.markusernst.ch/anthracite/living_divani.html
After googling and experimenting for several hours, I ended up doing
this demo with tables. The main problems are the vertical centering of
the info area, and of the text inside the squares.
|
by: =?Utf-8?B?ZnJhbmt5?= |
last post by:
Hello,
I've created a table that has two rows that are span across three columns.
The third row has three columns, each with an image. The last row is also
span accross three columns. The span rows are centering their data.
however, the row with three columns, each with images (myimages1-3) are not
centering with the rest of the table. Any idea why?
Thanks in advance!
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |