Old 13-10-2005, 12:20   #1 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,945
CSS issues

been working on doing my first CSS site at work, and its all gone pretty well except for a few things..

1. centering the container div, i cant seem to make it center to the page, and have resorted to using the <center> tag (yes, i know)
2. the container border is supposed to go around all the content, it does this in IE but not in firefox/opera etc
3. the footer links look fine in IE but go over to a new line in FF/Op

Any ideas?

Here's the link: http://www.nicehostels.com/index.htm

Scott
  Reply With Quote
Old 13-10-2005, 12:24   #2 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,945
oh, and also, i did use some tables, but only for tabular information.. (im pretty sure that as long as tables are used for their original purpose thats ok!)
  Reply With Quote
Old 13-10-2005, 12:25   #3 (permalink)
d*d
Moderator
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,394
centering with css isn't as straight forward as it should be because you need two methods, one for ff and one for IE. set left and right margins to auto for FF and use text-align: center for IE.

Tables are fine to tabulate data, thats what their there for
  Reply With Quote
Old 13-10-2005, 13:12   #4 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,945
ah, cheers!
  Reply With Quote
Old 13-10-2005, 23:34   #5 (permalink)
roto
Floating libation anyone?
 
roto's Avatar
 
Join Date: Apr 2003
Location: El Barco del Amor
Posts: 4,650
Send a message via AIM to roto Send a message via Yahoo to roto
Quote:
Originally Posted by d*d
centering with css isn't as straight forward as it should be because you need two methods, one for ff and one for IE. set left and right margins to auto for FF and use text-align: center for IE.
And these 2 methods work well to center in all other browsers, too?
__________________
fun: HGC v.4 | last.fm: DT | me | oi! f*ck u roto: ...via meebo!

New to interweb design? Your friends at dt can help.
  Reply With Quote
Old 14-10-2005, 05:38   #6 (permalink)
d*d
Moderator
 
d*d's Avatar
 
Join Date: Oct 2004
Location: Bristol
Posts: 3,394
Quote:
Originally Posted by ®oto
And these 2 methods work well to center in all other browsers, too?
A good question to which I don't know the answer
  Reply With Quote
Old 14-10-2005, 05:41   #7 (permalink)
gray
i still want paying
 
gray's Avatar
 
Join Date: Oct 2003
Location: newcastle, uk
Posts: 4,769
Quote:
Originally Posted by stealthcow
2. the container border is supposed to go around all the content, it does this in IE but not in firefox/opera etc

try

clear: both;

to the #footer

edit: sorry wont work if the footer is inside the container, going to have to add a <div class="clearer">&nbsp;</div> after the container div with .clearer{ clear:both; }

think thats the problem
  Reply With Quote
Old 14-10-2005, 05:42   #8 (permalink)
aspiramedia
Unregistered user
 
aspiramedia's Avatar
 
Join Date: Aug 2005
Posts: 312
Quote:
Originally Posted by d*d
A good question to which I don't know the answer

In all browsers I've tested. It's only IE which requires the text-align:center jobby.
  Reply With Quote
Old 14-10-2005, 05:44   #9 (permalink)
smallbeer
I Ain't Losing Any Sleep™
 
Join Date: Apr 2003
Posts: 5,205
Quote:
Originally Posted by ®oto
And these 2 methods work well to center in all other browsers, too?

Yep. AFAIR it's just IE5.x that has trouble with the margin: auto method.

Code:
body { text-align: center; /* centres in IE5.x */ } #container { width: 760px; /* needs a width specified */ margin: 0 auto; /* centres the div in compliant browsers */ text-align: left; /* because you centred the text in the body rule, you now have to bring everything back left */ }
  Reply With Quote
Old 14-10-2005, 06:24   #10 (permalink)
stealthcow
knocking heads
 
stealthcow's Avatar
 
Join Date: Jul 2003
Location: London, UK
Posts: 1,945
cheers, that worked for the border and the alignment
  Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search


Contact Us - Web Design Forums - Archive - Top
Search Engine Optimization by vBSEO 3.0.0 RC8