Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Old 01-05-2009, 11:03 PM   PM User | #1
breatheorange
New to the CF scene

 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
breatheorange is an unknown quantity at this point
Text moving in browser...Dreamweaver

Hi guys, I'm working on a limousine website (www.expresslimo.info), and in IE and Mozilla, the text is moving around when you resize the window.

I used flash for the intro which worked just fine, then used Dreamweaver to lay out my text in layers. My code is listed below. Can someone help me figure out how to get the text to remain in the same place regardless of the size of the browser? Is there a better way to do text than with layers? Thanks in advance.
<html>
<head>
<title>Welcome to Express Limousine Service! Home Page</title>
<meta name="generator" content="">
<meta name="description" content="Express Limo Service specializes in giving each client the best day of their life through amazing limo service for weddings, parties, special occasions and more.">
<meta name="keywords" content="Limo, Service, Rental, Limo Rental, Charleston, SC, South Carolina, charleston south carolina limousine service, vintage limousine, rolls royce limousines, lincoln superstretch limousine, mercedes strecth limousine,Classic vintage limousines, chaufered cars, corporate cars, sedans, busses and luxry cars, airport pick up, prom, weddings, bachlor parties, bachelorette parties">
<meta name="REVISIT-AFTER" content="1 DAYS">
<meta name="robots" content="ALL,INDEX,FOLLOW">
<meta name="distribution" content="Global">
<meta name="rating" content="General">
<META NAME="author" CONTENT="www.expresslimo.info">

<style type="text/css" media="screen"><!--
#layer1 { height: 342px; width: 650px; left: 320px; top: 300px; position: absolute; visibility: visible; }
--></style>
</head>
<body background="bg2.jpg">
<div id="layer1">
<p><font size="3" color="#ffcc66" face="Futura Bk BT, FontName"><em>Once upon a time</em>...</font><font size="3" color="white" face="Futura Bk BT, FontName">a King gave his most loyal subjects an amazing gift - land that was five times the size of his island kingdom. The benefactors built this grant to become one of the most desirable destinations on earth. Its capital city became a beautiful dream spot for the lords of the new world-the lords of science, industry and leisure. This city is known as &quot; <em>Charleston</em>.&quot;<br>
<br>
Now, the ambience of the old city in the New World cannot be fully appreciated without utilizing transportation worthy of a lord and his lady. As a result of our appreciation for history and a current perspective, we at <em>Express Limousines</em> have promoted our products in the most traditional sense -- with style, comfort and a certain &quot;joie de vivre&quot; – from the beginning. Our love of life, especially Charleston life, makes the experience truly a Charleston experience, and our vehicles reflect this passion. Each one is superbly manicured to perfection, featuring fine interiors, communication equipment, televisions, and stereo systems to fit every musical taste.<br>
<br>
</font><font size="3" color="#ffcc66" face="Futura Bk BT, FontName"> Our timeless motto at Royal Limousines captures the mood we intend for every client -- <em>the best day of your life</em>. Indeed, our business depends on your leisure. We pride ourselves in making your day as good as it gets.</font></p>
</div>
<!-- ImageReady Slices (home.ai) -->
<p>&nbsp;</p>
<div align="center">
<table id="Table_01" width="1007" height="653" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="19"> <img src="images/home_01.jpg" width="1006" height="220" alt=""></td>
<td> <img src="images/spacer.gif" width="1" height="220" alt=""></td>
</tr>
<tr>
<td rowspan="7"> <img src="images/home_02.jpg" width="75" height="432" alt=""></td>
<td rowspan="2" align="left" valign="top"> <a href="home.html"><img src="images/home_03.jpg" width="43" height="17" alt="" border="0"></a></td>
<td rowspan="7"> <img src="images/home_04.jpg" width="30" height="432" alt=""></td>
<td rowspan="2" align="left" valign="top"> <a href="fleet.html"><img src="images/home_05.jpg" width="132" height="17" alt="" border="0"></a></td>
<td rowspan="7"> <img src="images/home_06.jpg" width="34" height="432" alt=""></td>
<td rowspan="3" align="left" valign="top"> <a href="packages.html"><img src="images/home_07.jpg" width="60" height="18" alt="" border="0"></a></td>
<td rowspan="7"> <img src="images/home_08.jpg" width="34" height="432" alt=""></td>
<td rowspan="2" align="left" valign="top"> <a href="clientele.html"><img src="images/home_09.jpg" width="115" height="17" alt="" border="0"></a></td>
<td rowspan="7"> <img src="images/home_10.jpg" width="34" height="432" alt=""></td>
<td rowspan="2" align="left" valign="top"> <a href="services.html"><img src="images/home_11.jpg" width="121" height="17" alt="" border="0"></a></td>
<td rowspan="7"> <img src="images/home_12.jpg" width="29" height="432" alt=""></td>
<td rowspan="4" align="left" valign="top"> <a href="http://www.limos.com/webQuote/requestQuote.aspx?crc=crc3606"><img src="images/home_13.jpg" width="54" height="20" alt="" border="0"></a></td>
<td rowspan="7"> <img src="images/home_14.jpg" width="29" height="432" alt=""></td>
<td colspan="2" align="left" valign="top"> <a href="links.html"><img src="images/home_15.jpg" width="37" height="16" alt="" border="0"></a></td>
<td rowspan="5"> <img src="images/home_16.jpg" width="31" height="411" alt=""></td>
<td colspan="2" align="left" valign="top"> <a href="contact.html"><img src="images/home_17.jpg" width="74" height="16" alt="" border="0"></a></td>
<td rowspan="7"> <img src="images/home_18.jpg" width="74" height="432" alt=""></td>
<td> <img src="images/spacer.gif" width="1" height="16" alt=""></td>
</tr>
<tr>
<td colspan="2" rowspan="4"> <img src="images/home_19.jpg" width="37" height="395" alt=""></td>
<td colspan="2" rowspan="4"> <img src="images/home_20.jpg" width="74" height="395" alt=""></td>
<td> <img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td rowspan="5"> <img src="images/home_21.jpg" width="43" height="415" alt=""></td>
<td rowspan="5"> <img src="images/home_22.jpg" width="132" height="415" alt=""></td>
<td rowspan="5"> <img src="images/home_23.jpg" width="115" height="415" alt=""></td>
<td rowspan="5"> <img src="images/home_24.jpg" width="121" height="415" alt=""></td>
<td> <img src="images/spacer.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td rowspan="4"> <img src="images/home_25.jpg" width="60" height="414" alt=""></td>
<td> <img src="images/spacer.gif" width="1" height="2" alt=""></td>
</tr>
<tr>
<td rowspan="3"> <img src="images/home_26.jpg" width="54" height="412" alt=""></td>
<td> <img src="images/spacer.gif" width="1" height="391" alt=""></td>
</tr>
<tr>
<td rowspan="2"> <img src="images/home_27.jpg" width="32" height="21" alt=""></td>
<td colspan="3" align="left" valign="top"> <a href="http://www.capaproducts.com"><img src="images/home_28.jpg" width="82" height="11" alt="" border="0"></a></td>
<td rowspan="2"> <img src="images/home_29.jpg" width="28" height="21" alt=""></td>
<td> <img src="images/spacer.gif" width="1" height="11" alt=""></td>
</tr>
<tr>
<td colspan="3"> <img src="images/home_30.jpg" width="82" height="10" alt=""></td>
<td> <img src="images/spacer.gif" width="1" height="10" alt=""></td>
</tr>
<tr>
<td> <img src="images/spacer.gif" width="75" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="43" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="30" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="132" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="34" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="60" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="34" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="115" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="34" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="121" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="29" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="54" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="29" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="32" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="5" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="31" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="46" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="28" height="1" alt=""></td>
<td> <img src="images/spacer.gif" width="74" height="1" alt=""></td>
<td></td>
</tr>
</table>
<!-- End ImageReady Slices -->
</div>
</body>
</html>
breatheorange is offline   Reply With Quote
Old 01-05-2009, 11:14 PM   PM User | #2
jcdevelopment
Senior Coder

 
jcdevelopment's Avatar
 
Join Date: Oct 2007
Location: Cowboy Nation
Posts: 2,112
Thanks: 158
Thanked 253 Times in 253 Posts
jcdevelopment will become famous soon enoughjcdevelopment will become famous soon enough
the major problem is this

Code:
#layer1 { height: 342px; width: 650px; left: 320px; top: 300px; position: absolute; visibility: visible; }
dont use position absolute.

Use padding and margins, that way they adjust to the users resolution. You need to drop the tables as well. Place the text inside of a div and use margins. The best bet is to redo this using divs or make a BG fro a big table in the middle where the text goes. The Text will keep moving unless this happens.

Hope this helped a little.
jcdevelopment is offline   Reply With Quote
Old 01-05-2009, 11:20 PM   PM User | #3
breatheorange
New to the CF scene

 
Join Date: Jan 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
breatheorange is an unknown quantity at this point
Do you have some sample code of what this would look like? Sorry, I'm very new to this.
breatheorange is offline   Reply With Quote
Old 01-05-2009, 11:39 PM   PM User | #4
jcdevelopment
Senior Coder

 
jcdevelopment's Avatar
 
Join Date: Oct 2007
Location: Cowboy Nation
Posts: 2,112
Thanks: 158
Thanked 253 Times in 253 Posts
jcdevelopment will become famous soon enoughjcdevelopment will become famous soon enough
well...

ok, you obviously took an image and sliced in a prgram that created this page for you. What you need to do is in the center... where the text goes, you need to slice a huge chunk of that, maybe the size of the text or a little bigger.

Like when you go to slice the image make the size about 660px X 352px. Then place that text inside the <td> with padding, like this.

Code:
<style type="text/css" media="screen"><!--
#layer1 { height: 342px; width: 650px; padding-left: 5px; padding-top: 5px; visibility: visible; }
--></style>
and you will have to make that image a back ground image, to where it looks like

Code:
<td colspan="" rowspan="" style="background-image:url('image.gif'); width:560px; height:352px;"> <div id="layer1">TEXT</div> </td>
i know thats alot, but see if you understand any of it.
jcdevelopment is offline   Reply With Quote
Old 01-05-2009, 11:44 PM   PM User | #5
Excavator
Senior Coder


 
Excavator's Avatar
 
Join Date: Dec 2006
Location: Alaska
Posts: 4,371
Thanks: 9
Thanked 607 Times in 601 Posts
Excavator will become famous soon enoughExcavator will become famous soon enough
Hello breatheorange,
Quote:
Is there a better way to do text than with layers?
DW has a nasty habit of directing new coders toward using layers.
It's MUCH better/easier and more compatable to use divs positioned with floats/margins.
DW does, however, suggest using a DocType. It will put one in automatically for you when you start a new document. You should check the link about DocTypes in my sig below.
There is also no need for tables here - see the link about tables in my sig too.

One more link, about absolute positioning...

Quote:
Can someone help me figure out how to get the text to remain in the same place regardless of the size of the browser?
I hope this makes sense...

To position your text, change your CSS to look like this:
Code:
#layer1 { 
height: 342px; 
width: 650px; 
float: left;
margin: 300px 0 0 320px;
}
Of course now, your div is pushed over because you text is not enclosed in it. This is when you need to lose the tables.
__________________
Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, then hack it for IE
Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad
Excavator is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:00 PM.

Home - Contact Us - Archives - Link to CF - Resources - Top 

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.