...

View Full Version : Use CSS for print style.



effpeetee
05-24-2007, 10:33 AM
Hello friends,

I am still not sure how to cope with text panels and how to deal with them with CSS.
If you look at http://www.exitfegs.co.uk/SteveandPhil.html,
You will find the "Home" and "Steve and Philip" text items. What I normally do is to insert the following on to the page, alter the text and then just drag the item into position.

Just a broad description of the CSS method would help. I would like to write the code for myself.

Thanks.

effpeetee


<div style="Z-INDEX: 101; LEFT: 258px; WIDTH: 549px; POSITION: absolute; TOP: 584px; HEIGHT: 50px">
<center><span class="t14aw"><p style="COLOR: #ffffff; BACKGROUND-COLOR: #00364a">Text goes here.</p></span></center>
</div>

cyberlogi
05-24-2007, 11:12 PM
First, you should stop using the wysiwig editor that you are using. Few people will understands what a 'text panel' is, because it is specific to your editor.

What you have are two absolutely positioned elements": one an anchor (the "home" link), the other a div (the "Steve and Philip" text). If you drop the "position:absolute" style then you will find that the elements you add to the page will intuitively move around each other.

Get yourself a good CSS book like CSS Mastery by "Budd, Moll, Collison" and read the first few chapters (or find a good online CSS tutorial). You need to understand some basics about CSS and you'll probably be able to answer your own questions, as you aren't doing anything complex.

Arbitrator
05-24-2007, 11:35 PM
I would:

Avoid absolute positioning. CSS is commonly sold to people using absolute positioning effects when they’re, generally, not needed. It also tends to be a cheap way to get out of creating a well‐written HTML document where content is written in logical order and is correctly marked up.
Use correct markup.
Naturally block‐level elements such as p are illegal inside of naturally inline‐level elements such as span.
This means that you should not use the center element (ever). Use the CSS declarations margin: 0 auto to center block‐level elements and text-align: center to center inline content (such as text).
Inline CSS (style attribute) is bad practice that degrades maintainability. Put all of your CSS into an embedded (style element) or external (CSS file) style sheet.

effpeetee
05-25-2007, 08:00 PM
First, you should stop using the wysiwig editor that you are using. Few people will understands what a 'text panel' is, because it is specific to your editor.

What you have are two absolutely positioned elements": one an anchor (the "home" link), the other a div (the "Steve and Philip" text). If you drop the "position:absolute" style then you will find that the elements you add to the page will intuitively move around each other.

Get yourself a good CSS book like CSS Mastery by "Budd, Moll, Collison" and read the first few chapters (or find a good online CSS tutorial). You need to understand some basics about CSS and you'll probably be able to answer your own questions, as you aren't doing anything complex.
I have ordered the book that you suggest. I hope that it is better than the three that I now have, Full of history; short on real help.

Thanks for your advice,

effpeetee

Squeak
05-25-2007, 08:13 PM
As someone who's new to CSS myself, I'd like to recommend the book "CSS: The Missing Manual" by David Sawyer McFarland. It helped me get the basics down with a lot of great tutorials and I'd really recommend it to any new coders.

-Adam

effpeetee
05-25-2007, 09:10 PM
As someone who's new to CSS myself, I'd like to recommend the book "CSS: The Missing Manual" by David Sawyer McFarland. It helped me get the basics down with a lot of great tutorials and I'd really recommend it to any new coders.

-Adam
Thank you Squeak,

I'll know what to do if this new book fails me. I just need to know CSS. I'm not interested in the first three chapters filled with the history of it as it is in one of my purchases.

-Frank alias effpeetee



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum