navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Couple css questions

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> Couple css questions
Page: [1]
 
peterby

 

Posts: 4
Joined: 1/11/2006
Status: offline

 
Couple css questions - 1/11/2006 2:42:20   
Hi:

I have a few CSS questions:

1. Here is a sample from my external stylesheet:

#trailer1
{
padding: 5px 5px 5px 5px;
font-size: 10pt;
text-align: center;
margin-top: 6px;
margin-bottom: 6px;
border-style: solid;
border-width: 1px;
border-color: #e4e4e4;
}

The font-size, text-align, and border items work fine. The padding and margin items do not work. There is no inline or embedded CSS to get in the way; the text for this table is coming from an included file. Does anyone know what causes this and what can be done to fix it?

2. The site I am designing has a long list of text links in the left hand column. This list of hyperlinks is maintained in an included file. When a user goes to a particular page, I want the link to that page (and that link only) in the column to automatically change to text only (no hyperlink, no underline, etc). Is there a way to do this in an external stylesheet?

Thanks
caz

 

Posts: 3587
Joined: 10/10/2001
From: Somewhere south of Chester, UK
Status: offline

 
RE: Couple css questions - 1/11/2006 8:52:54   
2. In the CSS
body#home a#home_nav, 
body#reasons a#reasons_nav, 
body#standards a#standards_nav, 
body#links a#links_nav, 
body#contact a#contact_nav {
background-color: #464646;
color: #fdac00;}


and the html
<body id="reasons">

<ul>

<li><a href="index.html" id="home_nav" title="Go to home page">Home</a></li>
<li><a href="reasons.html" id="reasons_nav" title="Go to reasons to have a website">Why have a website?</a></li>
<li><a href="standards.html" id="standards_nav" title="Standards compliance">Standards compliance</a></li>
<li><a href="#" id="links_nav">Links</a></li>
<li><a href="formtest.html" id="contact_nav" title="Go to contact page">Contact</a></li>
</ul>


You can give each page a body id and give the navigation <a> a corresponding id, so that when you are on that page the nav styling is as you want it to be. In this case it is the background colour, but you can make it do what you wish.

For no.1 it would help if you can give a url, but I would advise you not to use point sizing for text unless it is intended as a printing stylesheet.

And welcome to Outfront. :)

_____________________________

Do not meddle in the affairs of cats, for they are subtle and will dance, or more on your keyboard.
Cheshire cat. www.doracat.co.uk

I remember when it took less than 4hrs to fly across the Atlantic.

(in reply to peterby)
peterby

 

Posts: 4
Joined: 1/11/2006
Status: offline

 
RE: Couple css questions - 1/11/2006 22:57:59   
quote:

For no.1 it would help if you can give a url, but I would advise you not to use point sizing for text unless it is intended as a printing stylesheet.


Don't have a URL yet, but here is the snippet of code that won't render the padding and margin correctly:

<table id="trailer1">
<tr>
<td>
<!--webbot bot="Include" U-Include="format/trailer1.htm" TAG="BODY" --></td>
</tr>
</table>

The included file is simply 3 lines of basic text. And as I said before, the font-size, text-align, and border items work fine. I've been wracking my brain trying to figure out the problem with the padding and margin.

(in reply to caz)
caz

 

Posts: 3587
Joined: 10/10/2001
From: Somewhere south of Chester, UK
Status: offline

 
RE: Couple css questions - 1/12/2006 7:20:33   
In what way don't the padding and margins work, is it just in IE and not Firefox or Opera, or all browsers? This is virtually impossible to answer because we can't see what is going wrong. Just a wild guess then- it could be a "collapsing" border problem.

_____________________________

Do not meddle in the affairs of cats, for they are subtle and will dance, or more on your keyboard.
Cheshire cat. www.doracat.co.uk

I remember when it took less than 4hrs to fly across the Atlantic.

(in reply to peterby)
peterby

 

Posts: 4
Joined: 1/11/2006
Status: offline

 
RE: Couple css questions - 1/12/2006 23:19:35   

quote:

ORIGINAL: caz

In what way don't the padding and margins work, is it just in IE and not Firefox or Opera, or all browsers? This is virtually impossible to answer because we can't see what is going wrong. Just a wild guess then- it could be a "collapsing" border problem.


Caz:

I finally got it to work. In the table properties dialog box I had deleted the cell padding and cell spacing values. When I changed them back to 0's the css for the padding and margins worked as they should.

One additional question though:

I have a table that is 755px wide. It is divided into three cell columns - the middle is 455px and the outer columns are 150px each. I tried inserting an image - 120px wide -
into one of the outer columns. When I did, the column width got a little wider. Any idea why and what can be done?

(in reply to caz)
d a v e

 

Posts: 4177
Joined: 7/24/2002
From: England (but live in Finland now)
Status: offline

 
RE: Couple css questions - 1/13/2006 8:37:39   
maybe you have a non-breaking space beteween it and some text? maybe it's not 120px wide in the html? maybe you have some padding set specifically in the cell or on some elements such as images? maybe... oh heck i'm bored of guessing: why not give us a url! :)

_____________________________

David Prescott
Gekko web design

(in reply to peterby)
peterby

 

Posts: 4
Joined: 1/11/2006
Status: offline

 
RE: Couple css questions - 1/13/2006 16:32:31   
quote:

I have a table that is 755px wide. It is divided into three cell columns - the middle is 455px and the outer columns are 150px each. I tried inserting an image - 120px wide -
into one of the outer columns. When I did, the column width got a little wider. Any idea why and what can be done?


I found a solution via MS. I put a spacer gif in the column the same width as the column. Now everything stays in place.

(in reply to peterby)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> Couple css questions
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts