Good Evening
I am building a website using DIVs and CSS.
I have everything in a container DIV, which I want to centre on the page. The CSS is below: - #container{
-
width: 100%;
-
max-width: 1000px;
-
width:expression(document.body.clientWidth > 1000? "1000px": "auto" );
-
float: center;
-
color: #fff;
-
margin-left: auto;
-
margin-right: auto;
-
padding: 0px;
-
border-width: 0px
-
}
Yet for some reason, in IE it won't center. Any idea why?
On a similar vein, within the container I have a navigation bar. For some reason, it just won't center. I thought it was because it was a <ul> and then indented, but I have tried setting margin and padding to zero.
Any ideas?
Code below: - #navbar ul {
-
margin-left: 0px;
-
margin-right: 0px;
-
padding-left: 0px;
-
padding-right: 0px;
-
height: 27px;
-
list-style-type: none;
-
text-align: center;
-
font-weight: bold;
-
font-size: 13px;
-
border-width: 0px
-
}
-
-
#navbar ul li {
-
display: inline;
-
height: 25px;
-
width: 100px;
-
text-align: center;
-
border-width: 0px
-
}
-
-
#navbar ul li a {
-
float: left;
-
width: 100px;
-
margin-left: 10px;
-
margin-right: 10px;
-
text-decoration: none;
-
display: inline;
-
line-height: 25px;
-
color: #fff;
-
border-width: 0px;
-
background: url("buttons.jpg") no-repeat 0 0
-
}
Thanks
Chris
1 1957
In the first, there is no such thing as 'float:center'. Also, Microsoft dropped support for 'expression' in IE8.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: gpbmike |
last post by:
I'm wondering if anyone else has had this problem before.
Every now and then a div on my page will overlap with another. Thi
only happens in firefox (vs. IE and Safari) and it corrects itself whe
you refresh the page.
Has anyone run into this before? Thanks
--
gpbmik
|
by: gregmercer |
last post by:
I have the following html sample, where I'd like to have a show and
hide two divs, one replacing the other. Following these two divs is a
third div (the bluediv) which I would like to have placed right up
directly below to the first or second div, depending on which is
showing.
If you load the html in Firefox, and then click on the "Edit" link you
can see that the first div is hidden, the second div is shown, however
the third div is...
|
by: Spondishy |
last post by:
Hi,
I am using the following in my stylesheet to center divs in firefox.
html>body {
font-size: 13px;
}
div.centerdiv
{
|
by: Jan Doggen |
last post by:
Hello,
The following code displays the name for all three elements in IE, but fails
for the1st and 3rd in Firefox.
What could be going on?
I tried SPAN instead of DIV doesn;t work either.
(What I finally want is to set style.invisibility for the text in that DIV)
TIA
Jan
|
by: JonBosker |
last post by:
Hi I have a little script that works well in IE but not in FireFox
function DivExpand(obj, setting)
{
if ((setting == 'hide') || ((setting == 'swap') &&
(document.all.style.display == 'block')))
document.all.style.display = 'none';
else
document.all.style.display = 'block';
}
| |
by: jwwest |
last post by:
Hello all,
I've been building a simple site based on XML, XSL and CSS in order to
help me learn those technologies better. However, building a tableless
page is brand new to me so I've run into a large amount of problems.
The biggest seems that Firefox wants to put a line in between two of
my nested tags for some reason. However, this is only in the XML
version. To design the page, I first made an HTML version, then I
created a XSL...
|
by: Trevor2007 |
last post by:
I have never been able to get the user.css file to work for me at ail, can any one help, I know how to change the web page font through the tools menue, but I would like to change the font size of the address bar to 16 or 20pt.(if this means I have to adjust the addresss bar itself to accomadate the font size change then I would also like to do that as well.
It's been a few months since I have tried to play with the usercontent and other Css...
|
by: mike57 |
last post by:
The minimal AJAX script below works in Firefox, but not in IE, Opera, or Chrome. I could use some suggestions or referrals to resources that will help me get the script working in other browsers.
Before there are six characters entered in the CAPTCHA code field, the 'Send' button is supposed to be disabled. When there are at least six characters in the CAPTCHA code field, the script attempts to verify the CAPTCHA w/AJAX. If it verifies, it...
|
by: oneadvent |
last post by:
This code works in Chrome and pulls a second drop down, but it will not work in IE6, (I dont have IE7/8 to check right now, but can later) and it works in FF, in IE it doesn't do anything at all.
Thanks for any help!
php code to push data to page:
<?php
$q=$_GET; //number
$blown = explode(',',$q);
$q = $blown;
$appl = $blown;
|
by: jeanyl |
last post by:
spotlight doesn't work in firefox and chrome...
<html>
<head>
<title>Your title here</title>
<style type="text/css">
<!--
#content{
position:absolute;top:0px;left:0px;text-align:center;
|
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: 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,...
|
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...
|
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: 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: 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...
| |