View Full Version : css formatting

02-01-2012, 01:35 PM
I am a complete beginner using dreamweaver, and have so far managed to create a basic website, that looks great in design mode, but when I select live view, none of the formatting appears. Could anyone please help with what i may have done wrong? thanks :smile:

02-02-2012, 07:33 AM
You need to show us some code or a page online or we'll only be guessing what might be wrong ;)

02-02-2012, 08:27 AM
Thank you for replying, i guess its obvious im not very clued up,

Here is the code from my index page.
I based this on an online tutorial i was following.




<link href="css/stlyes.css" rel="stylesheet" type="text/css" media="screen" />
<link href="css/print.css" rel="stylesheet" type="text/css" media="print"/>

<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="content-type" content="cache" />
<meta name ="robots" content="INDEX, FOLLOW" />
<meta name ="keywords" content="Enter Keywords" />
<meta name ="description" content="Description Here" />

<title> </title>

<!-- Google Analytics Code Goes Below Here -->

<!-- End Google Analytics Code -->

<link href="image-background-1.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

<body onLoad="MM_preloadImages('images/IMG_1857.jpg','night-club-pic-2.jpg','images/timing-img-4.jpg','images/web-main-titles-home-vids-2.jpg','web_main_titles-2.jpg','images/web-main-titles-nightclub-2.jpg')">

<div id="body">


<div id="outer">
<div id="wrapper">

<div id="logo">
<img src="images/web_logo_4.jpg" />

<div id="social-media-icons">
<li><a href="http://www.facebook.com"><img src="images/FB_Img_1.jpg" /></a></li>
<li><a href="£"><img src="images/FB_img_2.jpg" /></a></li>
<li><a href="http://www.twitter.com"><img src="images/fb_img_3.jpg" /></a></li>
<li><a href="http://www.youtube.com"><img src="images/fb_img_4.jpg" /></a></li>

<div id="topnav">
<li><a href="index.html">Home</a></li>
<li><a href="about.html">About</a></li>
<li><a href="contact.html">Contact</a></li>

<div id="example-pics">

<a href="filmmaker.html"><img src="images/timing-img-3 copy.jpg" class="image-frame" id="Image3" onMouseOver="MM_swapImage('Image3','','images/timing-img-4.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a>
<a href="home_videos.html"><img src="images/baby_danny_1.jpg" class="image-frame" id="Image1" onMouseOver="MM_swapImage('Image1','','images/IMG_1857.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a>
<a href="night-club.html"><img src="images/nightclub_pic_2.jpg" class="image-frame" id="Image2" onMouseOver="MM_swapImage('Image2','','night-club-pic-2.jpg',1)" onMouseOut="MM_swapImgRestore()" /></a>

<div id="img-1">

<img src="images/web_main_titles.jpg" id="Image5" onMouseOver="MM_swapImage('Image5','','web_main_titles-2.jpg',1)" onMouseOut="MM_swapImgRestore()"/>


<div id="img-2">
<img src="images/web-main-titles-home-vids.jpg" id="Image4" onMouseOver="MM_swapImage('Image4','','images/web-main-titles-home-vids-2.jpg',1)" onMouseOut="MM_swapImgRestore()"/>

<div id="img-3">
<img src="images/web-main-titles-nightclub.jpg" id="Image6" onMouseOver="MM_swapImage('Image6','','images/web-main-titles-nightclub-2.jpg',1)" onMouseOut="MM_swapImgRestore()" /> </li>



<p class="footer"> Copyright 2011 laurenKproductions </p>






Does this give any clues or would you need to see the css code as well?
I really appreciate any help you could give.

02-02-2012, 08:34 AM
is that right or is it a typo stlyes

in <link href="css/stlyes.css" rel="stylesheet" type="text/css"

02-02-2012, 08:35 AM
That is very strange. Your code looks fine to me. Are your site definitions set up OK?

02-02-2012, 08:52 AM
is that right or is it a typo stlyes

in <link href="css/stlyes.css" rel="stylesheet" type="text/css"

It is a typo but that would affect both design and live view no?

02-02-2012, 07:15 PM
Thank you for your replies,

Which part is a typo? as I copied the code from a tutorial I wouldn't know what part is wrong? but it does work in design mode.

I believe the site definitions are right, what particular part could affect it?

sorry if these questions are obvious,

02-02-2012, 07:20 PM
Would I need a url for my site to be able to see it in live view?

02-02-2012, 09:51 PM
In Dreamweaver preferences (menu: Dreamweaver>Preferences…) try checking the "Preview using temporary file" option.

02-02-2012, 10:45 PM
unfortunately that didn't work but thank you.
i just dont understand why it works in design but not live view, have i missed a major step?

02-03-2012, 12:02 AM
It is a typo but that would affect both design and live view no?
time for me to plan a visit to Mr Seymour Clearly the optician again