Copiar link para a área de transferência
Copiado
A few years ago I put some styling inside <style> tags in my html document to test some things and they wound up staying there without getting transferred to the .css document. Now I'm trying to edit them or remove them but they're grayed out. They are overriding anything I put in the .css file. So I'm stuck! The document uses a template and I have very little experience with DW templates and uneditable areas, but the styling does not appear to me to be inside an uneditable area.
1- How to make these areas editable?
2- If that can't be done, how to fix the problem another way?
The code is below. Thanks!!
-------------------------------------------------
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="ie6 oldie"> <![endif]-->
<!--[if IE 7]> <html class="ie7 oldie"> <![endif]-->
<!--[if IE 8]> <html class="ie8 oldie"> <![endif]-->
<!--[if gt IE 8]><!-->
<html lang="en"><!-- InstanceBegin template="/Templates/Template - Index Page.dwt" codeOutsideHTMLIsLocked="false" -->
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<meta name="copyright" content="The copyright for all content at this site is owned by Third Day Media, LLC. All rights reserved.">
<link rel="icon" href="images/favicon.ico">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Page Title</title>
<!-- InstanceEndEditable -->
<link href="css/normalize.css" rel="stylesheet" type="text/css">
<!-- Core Bootstrap CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet" type="text/css">
<!-- Bootstrap Sticky Footer -->
<link href="css/sticky-footer.css" rel="stylesheet">
<link href="css/customized.css" rel="stylesheet" type="text/css">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<style>
* {
vertical-align: baseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;
font-size: 100%;
border: 0 none;
outline: 0;
padding: 0;
margin: 0;
}
/* CSS USED TO STYLE THE 2 COL CONTAINER */
* {
box-sizing: border-box;
}
.block-wrapper {
display: table;
width: 90%;
margin: 0 auto;
/* [disabled]background-color: #FFC; */
height: auto;
}
/* .left, .right {
display: table-cell;
vertical-align: middle;
width: 50%;
} */
.left {
/*border-right: #ccc; */
display: table-cell;
vertical-align: middle;
width: 50%;
}
.right {
display: table-cell;
vertical-align: middle;
width: 50%;
}
.text-block {
float: right;
width: 80%;
text-align: center;
}
.text-block p {
font-size: 1.2em;
line-height: 1.4em;
color: #fff;
}
</style>
<!-- InstanceBeginEditable name="head" -->
<!-- InstanceEndEditable -->
</head>
Looks like a child page of a .DWT Template.
You'd need to open the parent Template "Template - Index Page.dwt" in your Templates folder to make changes to the css in the <head> of that page, unless the css were within an Editable Region.
Copiar link para a área de transferência
Copiado
Remove the CSS comments /* */
Nancy
Copiar link para a área de transferência
Copiado
It won't let me. Won't let me add or delete anything.
Copiar link para a área de transferência
Copiado
Looks like a child page of a .DWT Template.
You'd need to open the parent Template "Template - Index Page.dwt" in your Templates folder to make changes to the css in the <head> of that page, unless the css were within an Editable Region.
Copiar link para a área de transferência
Copiado
Bingo, Jon, thanks for the rescue!!
So I guess all I need to do again in that situation is edit the .dwt file for that document and then save it? It certainly worked on this problem.
Copiar link para a área de transferência
Copiado
Personally, I don't put any css in the <head> of a page. I prefer to have it in an external .css style sheet.
That way you never have to worry about in-page css overwriting your external styles (since there wouldn't be any), or issues with locked portions of Templates keeping you from making changes (css wou'dn't be in a child page).
Copiar link para a área de transferência
Copiado
I completely agree. I was having a lot of trouble with one aspect of the layout and took shortcuts... not again. Thanks again for your help!
Copiar link para a área de transferência
Copiado
Jon, If I may impose to ask a sub-question without opening a new topic...
As I continue to try to clean up this old project and integrate the in-document styling to the external stylesheet, the DW Template functionality keeps interfering. I started by creating a new .htm document to 'start over' with, without a template. But for some reason, I keep getting prompted or forced to save the document as a template, even though I don't wish to. I also tried 'save as' an .htm doc again, as well as copying/pasting the code in a notepad and pasting it in an entirely new blank html page made without a template... but it keeps trying to save as a template against my wishes and in so doing, messes up the paths to my images, directing paths to a local drive instead of the /images directory I specified in the code. I have no idea why it's doing this.
This is why I'm afraid of the whole template system, it seems quite unpredictable and sticky. Any idea what I'm doing wrong or how to work with just plain docs without the templates getting in the way, at least until I can rebuild this thing??
Thanks!!
Copiar link para a área de transferência
Copiado
Jon,
I saw that somehow during the process, the Template code (<!-- Start template editable area... etc>) wound up inside the .html document again. I've removed it and so far it seems to be saving successfully as a plain .html doc. If you have more to add, would love to hear it. THANKS!
Copiar link para a área de transferência
Copiado
When you copy code from a .DWT template file, DW will automatically attempt to save it as a template again because of the Template Comment in the <head>, and throughout the document defining Editable Regions.
Removing those html comments will make DW stop trying to save it as a template, they start with <!-- and end with -->
Copiar link para a área de transferência
Copiado
You speak truth.... I'm indeed out of the woods from removing that code.
Don't know if I can give you two correct answers in one exchange.
Thanks again for your help!
Encontre mais inspiração, eventos e recursos na nova comunidade da Adobe
Explore agora