Log in

View Full Version : newbie need CSS help



paldo
04-21-2010, 11:30 PM
I want a CSS for my site but I'm tired of searching the net for solutions. Your help is needed.
Safari browser place the page correctly in the middle, IE doesn't.
My site is 1000px width and should be center in the middle of the browser, working on IE, Safari and FF.
My table-layout has two rows: the first one has 5 cells with the same width where I have my links, the second rows has one cell where I load a image. Can someone help me ?

www.paolinet.info/aude/cours_enfants_new.html

Thank you

BLiZZaRD
04-21-2010, 11:45 PM
It's mainly because you are using tables for layout. That's a no-no. But in your page, easily fixed.

First open your page to edit and find this:



<body>


Make it look like this:



<body>
<div id=theWrap">


Than find this:



</body>


and make it look like this:



</div>
</body>


Next find this near the top:



<style type="text/css">
<!--
a:link {


Make it look like this:



<style type="text/css">
<!--

#theWrap {
width: 1000px;
margin-left: auto;
margin-right: auto;
}

a:link {


save, re-upload, refresh the page and see if that helps.

paldo
04-23-2010, 08:30 AM
Thank you. There is still a problem with centering the entire <div> in the middle of the browser's window in IE. The alignment is still on the left. Also strange is the fact that with your CSS change the browser Safari does not load the image. Opera and Camino does.
As a Mac user I never use IE, but this browser seems to give headache to many people trying to develop a website.

paldo
04-23-2010, 08:48 AM
I think that the problem of centering has to do with the fact that I have a table-layout.

BLiZZaRD
04-23-2010, 07:05 PM
That's part of it. The tables I mean. The other part is you are using element level CSS (putting declaration on each element).

If you take all the CSS and put it in a separate sheet, it will be easier to set up and control. You can see where it is getting broken and such.

paldo
04-25-2010, 12:27 PM
O.k. I will change my page layout. Instead of a table I will be using <div> tags.
I tried to convert a table with one row and three cells where I have three links but the cells are vertical. How to have them on the same row?
<div>
<div>link1</div>
<div>link2</div>
<div>link3</div>
</div>


Thanks

BLiZZaRD
04-25-2010, 08:10 PM
In the CSS you can either display:inline OR you can float:left the 3 dives inside the container div.