Download Firefox: WindowsMac OS X
logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: [ILUG-Webdev] CSS Problems.: msg#00002

Subject: Re: [ILUG-Webdev] CSS Problems.
OK,
Just having come home from the pub when I sent my first reply and now being a bit more sober, I've just looked at your test page and still recommend that you use class instead of id. Having just looked at your stylesheet, I would recommend structuring it something like my example below.

In a css that I use I have the file structured as follows:

.title
{
position: relative;
background: #9B410E;
font-family: verdana, arial;
font-size: 22px;
color: #edf9ff;
letter-spacing: 5px;
padding: 10px;
border-left: solid thin black;
border-right: solid thin black;
border-top: solid thin black;
border-bottom: solid thin black;
}

.nav
{
border-left: solid thin black;
border-right: solid thin black;
border-bottom: solid thin black;
position: relative;
background: #CBB99C;
padding-top: 3px;
padding-bottom: 3px;
padding-left: 10px;
color: #ffffff
}

These are but 2 out of several that I use in one stylesheet but you can see pretty much what they do and you should have no problem adapting the structure and layout to your own needs. So to use it in your page, replace id with class.

Hopefully this helps even more!

Cheers
Robert



----- Original Message ----- From: "Robert Sweetnam" <ilug@xxxxxxxxxxx>
To: "Gearoid Donnellan" <gearoid.donnellan@xxxxxxxxx>; <webdev@xxxxxxxx>
Sent: Wednesday, September 08, 2004 12:20 AM
Subject: Re: [ILUG-Webdev] CSS Problems.


How are you defining an div?
If you use is as an id i.e. div id= then this will cause the problem you are having. Instead try decalring your div as a class i.e. div class=

Someone else might have a proper answer for this but in my stylesheets I always have id's preceeded by # as in #divname and classes with a period as in .divname

Hope this helps
Robert

----- Original Message ----- From: "Gearoid Donnellan" <gearoid.donnellan@xxxxxxxxx>
To: <webdev@xxxxxxxx>
Sent: Tuesday, September 07, 2004 11:08 PM
Subject: [ILUG-Webdev] CSS Problems.


I've only really started using css recently so I could b making a
mistake. I am using div tags and css to position the different
sections of the website.
When I view my webpage in Firefox it automatically expands the
sections to the width of the browser but in IE it wraps the sections
to the width of the text in the div tag.

Is there anyway to fix this or get around it?

Sorry If thats unclear.
You can view the webpage here www.compsoc.nuigalway.ie/~drakon/test
--
ILUG Web Development
http://mail.linux.ie/mailman/listinfo/webdev/




--
ILUG Web Development
http://mail.linux.ie/mailman/listinfo/webdev/




--
ILUG Web Development
http://mail.linux.ie/mailman/listinfo/webdev/



<Prev in Thread] Current Thread [Next in Thread>