LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG-Webdev] CSS Problems.

[ILUG-Webdev] CSS Problems.

Robert Sweetnam ilug at labarry.com
Wed Sep 8 01:20:15 IST 2004


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 at labarry.com>
To: "Gearoid Donnellan" <gearoid.donnellan at gmail.com>; <webdev at linux.ie>
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 at gmail.com>
> To: <webdev at linux.ie>
> 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/
>
>
> 




More information about the Webdev mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell