CSS - Converting A Stylesheet From A .net App To One For Drupal
i have to move our site to drupal, and am having a huge issue with a certain div design.
Version 1 - Original, old site shows it working perfectly but... Version 2 - Drupal, new site shows all the divs incorrectly. i have spent the past week, from 9-5 trying to figure this out but i think i have just burned out. .. can someone please help me here as this needs to be done since this is on the main page. I know it has something to do with the side-feature and afeature divs ... Similar TutorialsQuote: Dan Cederholm of SimpleBits: It's important to note that the cascading effect of CSS still applies, and alternate style sheets work just like any other style sheet, in that only common rules are overridden when the alternate styles are active. So if we had layout, positioning, and other site-wide rules in default.css that weren't repeated in the alternate style sheets, those default rules would still work. I'm making a site that has a default stylesheet with a fixed layout and an alternative one with a fluid layout. The problem I'm having is the alternative sheet not inheriting css from the default stylesheet even though the rules are not overridden. At the moment, my alternative stylesheet is an exact copy of the original (everything included) with only 3 width values changed to percentages. Theoretically, I should be able to only include these three rules alone in the alt sheet, as rules are carried over from the default sheet unless overridden. However, when I do try to reduce the alt sheet to just: Code: #container { width: auto; } #main { width: 65%; } #navbar { width: 30%; } all unincluded formatting is lost. Am I doing something wrong? Cheers, Sam. I have a very strange problem. My firefox is ignoring the changes I made to the style sheet. I have this in my webpage and the style.css file location is right (one directory up). <link href="../style.css" rel="stylesheet" type="text/css"> Because it's ignoring my new changes, I deleted everything in my style.css file, and the page still displays as though the file exists. However, if I delete the above line, then the page will display without any style. IE is loading with the changes I made though. I have also checked my stylesheet with the W3C css validation and it has no error. So, any body know why this is happening? allanwav.com < that's my site. i can't get the freaking little orange boxes that appear on the bottom left and right of the screen after you've clicked on the word "oof". here's my stylesheet: /** * Global Styles */ * { margin:0pt; padding:0pt; } p { margin: 10px 0; } ol, ul { margin: 0 10px 0 35px; } a { color: #FF5A00; } em, cite, address { font-style: italic; } strong { font-weight: bold; } code{ font-family: "Courier New", Courier, monospace; } a:hover { text-decoration: none; } body { background: #ffffff url(images/sidebar2.gif) repeat-x; color: #6B6B6B; font-family: "Trebuchet MS",Arial,Helvetica,sans-serif; font-size: 12px; } tbody { border-top: none; } table { margin-bottom: 15px; } td, th { padding: 3px; } h1, h2, h3, h4 { font-weight: normal; letter-spacing: -0.035em; } h3, #aggregator h3.feed-item-title { font-size: 17px; } h4 { font-size: 14px; } fieldset { padding: 8px; margin: 3px 0; border: 1px solid #F2F2F2; } dl dt { margin-top: 5px; } dl dd { margin-bottom: 5px; } tr.even, tr.odd { background-color:#fcc66; } input.form-text, textarea.form-textarea { border: 1px solid #a0a0a0; padding: 2px; } /** * Pager Stylings */ .item-list ul.pager li.pager-current { color: #fff; padding: 0.5em; background-color: #bbb; border: 1px solid #000; } .item-list ul.pager li { padding: 0; margin: 0 0 0.25em 0.5em; font-size: 14px; } .item-list ul.pager li a { border: 1px solid #F0F0F0; padding: 0.5em; text-decoration: none; } .item-list ul.pager li a:hover { background-color: #FFFFCC; } .item-list ul.pager { margin: 1.75em 0 0.75em; } /** * Layout Styles */ div#wrapper { margin: 0 auto; width: 960px; background: transparent url(images/img02.gif) repeat-y; } div#wrapper2 { background: transparent url(images/orangebodysidebar.gif) no-repeat scroll left bottom; } div#container { background: transparent url(images/uppercontentbox.gif) no-repeat; } div#logo { float: left; } div#logo h1 { font-size: 40px; letter-spacing: -3px; margin: 0; padding: 78px 0 0 78px; text-transform: lowercase; border-bottom: none; } div#logo div.site-slogan { padding: 0 0 0 90px; color: #fff; margin-top: -5px; font-style: italic; font-size: 13px; } div#logo h1 a { color: #fff; text-decoration: none; } /** * Menu */ div#menu { float:right; } div#menu ul { padding: 112px 78px 0 0; } div#menu a { color: #fff; font-size: 13px; font-weight: bold; text-decoration: none; margin: 0 5px; } div#menu a:hover { border-bottom: 3px solid #FF5A00; padding-bottom: 0; } /** * Header stylings */ div#header { background:url(images/banner.gif) no-repeat; height:164px; width:1024px; } /** * Content section */ div#main { float: left; padding: 0 0 0 76px; width: 575px; } div.messages { font-size: 22px; margin: 20px 5px; padding: 8px; color: #000; } div.node { margin: 30px 0; } div.node-page-view { margin: 0 0 30px; } div.status { background: #FF0; border: 1px solid #FF5A00; } div.warning { background: #ff9; border: 1px dotted #f00; margin-bottom: 10px; } div#mission { text-align: justify; border: 1px solid #eee; margin: 10px 0pt; padding: 16px; } div.book-navigation { margin: 20px 0; } div.book-navigation .menu { padding: 1em 0 1em 3em; } h1.title { font-size: 28px; color: #37404C; margin-bottom: 11px; padding-bottom: 8px; } h1.title a { color: #37404C; } h2 { font-size: 24px; font-weight: bold; } div.node h2.title { margin-bottom: 10px; padding-bottom: 9px; } div.node h2.title a { color: #37404C; text-decoration: none; } div#main div.tabs { margin: 15px 0; } ul.tabs { border-bottom: none; } div#main div.tabs li a { border-bottom: 1px solid #BBBBBB; margin-right: 12px; color: #308; } div#main div.tabs li a:hover { background-color: #F8F8FF; } div#main div.tabs li a:active, div#main div.tabs li a.active { color: #000; } div.node fieldset.collapsed { border: none; margin-bottom: -15px; } div.node fieldset legend { padding-right: 22px; background: url(images/tag_orange.png) no-repeat right; } div.meta { background: url(images/img07.gif) repeat-x bottom; line-height: normal; padding: 10px; clear: both; } div.meta div.submitted { float: left; } div.meta div.links { float: right; } /** * Comment Style */ #aggregator .feed-item-categories, div.meta div.links ul.links a { background-repeat: no-repeat; padding-left: 18px; } div.meta div.links ul.links li.comment_add a { background-image: url(images/comment_add.gif); } div.meta div.links ul.links li.comment_comments a { background-image: url(images/comment.png); } div.meta div.links ul.links li.comment_edit a { background-image: url(images/comment_edit.png); } div.meta div.links ul.links li.comment_delete a { background-image: url(images/comments_delete.png); } div.meta div.links ul.links li.comment_reply a { background-image: url(images/comments.png); } div.meta div.links ul.links li.comment_new_comments a { background-image: url(images/alert.png); } div.meta div.links ul.links li.node_read_more a { background-image: url(images/readmore.png); } div.meta div.links ul.links li.blog_usernames_blog a { background-image: url(images/user-plain-blue.png); } div.meta div.links ul.links li.book_add_child a { background-image: url(images/addpage.png); } div.meta div.links ul.links li.book_printer a { background-image: url(images/print.png); } div.meta div.links ul.links li.comment_forbidden a { padding-left: 0px; } /* div.meta div.links ul.links li.node_read_more a { background-image: url(images/readmore.png); } */ div.comment { margin-bottom: 15px; border: 1px solid #ccc; padding: 8px; } div.comment h3.title { font-size: 16px; } div.comment h3.title a { color: #111; text-decoration: none; } div.comment span.new { float: right; margin: 0 10px 10px; } form#comment-form div.comment-published { margin-top:15px; } /** * Admin section stylings */ div.admin { padding-top: 0px; } div.admin .left { margin-left: 3px; } div.admin .right { margin-right: 3px; } div.admin-panel h3 { background: #F3F3F3; color: #000; font-weight: bold; padding: 3px; } div.compact-link { text-align: center; margin-bottom: 20px; font-size: 18px; } /** * Block styles */ div.block h2.title { font-size: 16px; margin-bottom: 10px; padding-bottom: 4px; } div.block { margin-bottom: 25px; } div.block div.content { text-align: justify; } #edit-search-block-form-1-wrapper label { display: none; } form input.form-submit { background: #6E9D00 url(images/img18.gif) repeat-x; border-color: #BAD300 rgb(125, 171, 0) rgb(87, 137, 0) rgb(169, 200, 23); border-style: solid; border-width: 1px; color: #FFF; font-size: 11px; font-weight: bold; padding: 1px 5px; } /** * News Aggregator stylings */ #aggregator h3.feed-item-title a { text-decoration: none; } #aggregator .feed-item-categories { background-image: url(images/tag_orange.png); } #aggregator .feed-item-meta { float: right; margin-left: 0.8em; text-align: right; padding: 7px; border-bottom: 1px solid #F2F2F2; border-left: 1px solid #F2F2F2; border-right: 1px solid #F2F2F2; background: #f8f8ff; } #aggregator .feed-item, #aggregator div.links { margin-bottom: 30px; } /** * Forums styling */ div#forum table { margin-top: 10px; } div.forum-topic-navigation a.topic-previous { background-image: url(images/arrow-single-left-green.png); background-repeat: no-repeat; background-position: left; padding-left: 15px; } div.forum-topic-navigation a.topic-next { background-image: url(images/arrow-single-right-green.png); background-repeat: no-repeat; background-position: right; padding-right: 15px; } /** * Sidebar styles */ div#sidebar-right { float: right; padding: 10px 76px 0 0; width: 200px; } div#sidebar-right div.item-list ul { padding:0pt 0pt 0.25em; } div#sidebar-right div.item-list ul li { list-style-type: none; margin: 0pt 0pt 0.25em; } div#sidebar-right li.leaf, div#sidebar-right li.collapsed, div#sidebar-right li.expanded { list-style-image: none; list-style-type: none; } div#sidebar-right .block ul { padding: 0 0 0.25em; list-style: none; } div#sidebar-right .block ul.menu li { margin: 0; } div#sidebar-right .block ul ul.menu { margin: 0 0 0 12px; } /** * Open ID login links */ li.openid-link a { padding-left: 22px; } html.js #user-login-form li.openid-link, html.js #user-login li.openid-link { margin:10px 0pt; } /** * Post-content blocks */ div#precontent { margin: 10px 50px; padding: 0 24px; } div#postcontent { background: #F2F2F2 url(images/img11.gif) repeat-x; margin: 10px 50px 0; padding: 10px 28px; } /** * Footer Styles */ div#postcontent .block { float: left; margin: 0 20px 25px; width: 225px; } div#postcontent .block-region, div#precontent .block-region { clear: both; } div#footer { } div#footer_copy { text-align: center; margin-top: 12px; } /** * OpenID link styling */ li.openid-link a { padding-left: 22px; } /** * Comment Pictures */ div.comment div.picture { float: left; margin: 5px; } /** * Node Pictures */ div.node div.picture { float: right; margin: 5px; } have a blog post page on this website: plesae searhc for "refbc" and you will come to the real estate foundation of BC website - go to news and events, news The title of each blog post is tagged to use H3, with a font size of 18px. This looks fine to me. The last 4 posts from this page also appear on the home page of the site (sorry I was not allowed to post links ...) They are under "Foundation News". The title of each post is bigger then H3 although it is h3. I was told that the home page font (or all fonts) is controlled by sIFR, which I don't know how to work with. This site is developed by someone else, but he has left and I need to do some changes. One being to make the blog post titles on the home page smaller. But I can't see how to do it, and I don't know how to work with this sIFR that the previous person has generated. My boss thinks that it is something really simple - like just make them smaller. So I need to produce some results quickly. Can someone help? I am very desperate here after about a week of trying to get this to work. Thanks. . I've got an odd bug in IE7 that's got me completely stumped. I'm using drupal for sort of an art/comic site, and I've built my own theme off of the Zen theme, for anyone who's familiar with it. My main page works just fine. Once I get to either the gallery or forum things start to collapse and get weird. My sidebar loses it's positioning, and the width of the list items in the unordered list shrink down to the size of the image or tex they contain, rather than extending to fill their container. The only consistency I can find here is that they're both using unordered lists, but beyond that I'm not sure what's going on. I've tried to go through and swat any obvious CSS and HTML errors, so any advice or insight on this would be much appreciated. eta: looks like I can't post an opening topic with links yet, so I'll have to post them as a reply or something. I have three different css Stylesheets. Now I want to give access to my users to change their required styles using dropdownlist. And next time when the user is login in the same last selected style sheet should be displayed to him. How can i do this please help me its urgent ? I was wondering does anyone know where I can obtain the Internet Explorer 6 stylesheet for Windows XP? The UI components in IE6 look different in Windows XP than IE6 for Windows 2000. I would like to obtain the stylesheet if it is available somewhere. Thanks for your help. Val Can you only exclude elements from a Print stylesheet? I'd like to print only a table of data and nothing else on the web page in a print style sheet. On the one hand Accessibility guidelines state that sites should work even if stylesheets fail to load... ... and then on another hand, you're told not to include any style/layout/formatting within an html page - to use the stylesheet instead. My question is this. Say i create a site which is arranged in the common layout of header at top, nav menu floated to the left, main content sitting on the right, and then footer below. Should the layout of the div's, namely the float left etc be within the webpage or the stylesheet. I guess most people will say stylesheet, but that means if the stylesheet fails to load, the site layout will be completely messed up with the content appearing below the nav menu. Do you make an exception in this case and include some limited layout-style information in the webpage? What are people's opinions on this? I'm fairly new at web development and pretty much a newbie at using CSS. I noticed on foxnews.com that they use a parameter with the CSS file. I've did searches on this but not turned up alot. Code: <LINK REL=STYLESHEET TYPE="text/css" HREF="/css/mainStyles2004.css?v2"> <LINK REL=STYLESHEET TYPE="text/css" HREF="/css/rootStyles.css?v3"> I'm assuming the ?v2 and ?v3 are PHP like paramters. I looked at the CSS file using the firefox web developer toolbar and I didn't see any referance to v2 or v3 in those files? Can anyone explain this to me? Hi Could someone assist me in making a print stylesheet for this site please! http://calibrehr.com/new/ What I need is: just the logo to display (remove nav) The text in the orange block to span the width of the page Remove subnav Some how diplsay the text that is in the purple boxes below the main content text I am stuck as to what to do and could really appreciate some help Many thanks! Hey all, a few probs here. My new webpage coded with stylesheets: http://www.stocksbridgepentaqua.co.uk/test/index.php It looks good in IE and bad in FireFox (mozilla) its not a major problem because the ppl im targetting are using IE. Next, on this page: http://www.stocksbridgepentaqua.co..../index.php?id=9 I want a scroll bar in the actual window instead of it making the box massive. And another thing, how do I make a space between the bottom of the website and the bottom of the browser? Thanks. Jack. Hi people, I am completely new to programming and have only spent this weekend learning it! I have managed to create a decent website already, however i am stuck at a point. On my main page, i have attached a CSS stylesheet with all the formatting for my page. My problem however is that when i try to format one section (<div id="gallery">) the formatting messes with the rest of the page. Is there a way that i can assign a style sheet to only that <div id="gallery"> without it applying to the entire html page. Any help is greatly appreciated! Thanks Chris Hiya, theres a website I'm creating a print stylesheet for which includes the company logo in the header, with a footer of contact details. problem is, the website is all static pages and 100 odd pages, so as I'm having to deal with the static state of the site for now, is there a way I can have in the Print stylesheet or in the CSS where the logo can be inserted in a header and a footer created with text? hope this makes sense? Hello All, I was hoping that you could look at a site for me, and help me figure out what is causing the rendering issues in IE6/7. I have a separate CSS stylesheet for anything that is IE7 or lower; however, I am not sure if it is actually loading at all. I don't really have access to IE6/7 in a live environment, to check everything about the site, so if anyone has any suggestions for tools that will allow me to work with a live view of IE6/7 that would be a great help as well. The site link is: http://www.saracanada.com/ Thanks in advance everyone. Hey, I've run into a problem where I though i knew how to do it an easy way but it only worked for about 5 minutes. Here is what I have. All of my pages have the same navigation from an external PHP file. The style is saved in the main.css stylesheet. When you select a link it gets a background image. I thought that I could save my self having to edit every page for IE by doing this in the main.css stylesheet Code: * html>#navwhatever{ /*set to gif iamge instead of PNG image*/ background-image:url('image/splash_legion.gif'); } This doesn't work. It still uses the PNG images. I'd realy like not to have to edit every page to fix my site for IE, any suggestions would be great. Thanks for reading ok the stylesheet contains this: BODY, TD, TR, P, UL, OL, LI, INPUT, SELECT, DL, DD, DT, FONT { font-family: Verdana, Arial, Clean, Helvetica, sans-serif; font-size: 12px; } and I need to add this into it BODY { scrollbar-face-color: #DEE3E7; scrollbar-highlight-color: #FFFFFF; scrollbar-shadow-color: #DEE3E7; scrollbar-3dlight-color: #D1D7DC; scrollbar-arrow-color: #006699; scrollbar-track-color: #EFEFEF; scrollbar-darkshadow-color: #98AAB1; } Ok here's what I don't understand. The original stylesheet(used by a php script) contains lots of things at the top separated by commas. Does that mean that it will affect all of those things? So I have to do this? BODY { font-family: Verdana, Arial, Clean, Helvetica, sans-serif; font-size: 12px; scrollbar-face-color: #DEE3E7; scrollbar-highlight-color: #FFFFFF; scrollbar-shadow-color: #DEE3E7; scrollbar-3dlight-color: #D1D7DC; scrollbar-arrow-color: #006699; scrollbar-track-color: #EFEFEF; scrollbar-darkshadow-color: #98AAB1; } TD, TR, P, UL, OL, LI, INPUT, SELECT, DL, DD, DT, FONT { font-family: Verdana, Arial, Clean, Helvetica, sans-serif; font-size: 12px; } Sorry about the newbie question, but I gotta start some where. hello guys! i have a form that contains a listbox, and am using IE6, and i put up a link to my external css file, but the appearance of listbox scroll bars didn't change, only the size of the font was changed, do i am missing something? or this is not possible to change the appearance of scrollbars for the listbox? below is my HTML code: PHP Code: <html> <head> <title>Test Page</title> <LINK href="styles.css" type=text/css rel=StyleSheet> </head> <body> <form method="POST" action="test.htm"> <p><select size="5" name="test"> <option value="1">one</option> <option value="2">two</option> <option value="3">three</option> <option value="4">four</option> <option value="5">five</option> <option value="6">six</option> <option value="7">seven</option> <option value="8">eight</option> <option value="9">nine</option> <option value="10">ten</option> </select><input type="button" value="Submit" name="B1"></p> </form> </body> </html> and below is my stylesheet: PHP Code: BODY { FONT: 8pt verdana, arial; COLOR: navy } TD { FONT: 8pt verdana, arial; COLOR: darkslateblue } .helphead { FONT: bold 16pt verdana, arial; COLOR: navy; TEXT-ALIGN: center } H2 { FONT-SIZE: 11px; FONT-FAMILY: verdana, arial COLOR: white } A:link { COLOR: navy } A:visited { COLOR: navy } A:hover { COLOR: #ff9900 } .funhead { FONT: 10pt Arial,Helvetica; COLOR: navy } .deschead { FONT: 600 10pt Arial,Helvetica; TEXT-ALIGN: center } .clsDescTab { BORDER-RIGHT: lightsteelblue 1px solid; BORDER-TOP: lightsteelblue 1px solid; BORDER-LEFT: lightsteelblue 1px solid; BORDER-BOTTOM: lightsteelblue 1px solid; BACKGROUND-COLOR: aliceblue } INPUT { BORDER-RIGHT: lightsteelblue 1px solid; BORDER-TOP: lightsteelblue 1px solid; BORDER-LEFT: lightsteelblue 1px solid; COLOR: navy; BORDER-BOTTOM: lightsteelblue 1px solid; FONT-SIZE: 11px; FONT-FAMILY: verdana, arial TEXT-ALIGN: left } SELECT { BORDER-RIGHT: lightsteelblue 1px solid; BORDER-TOP: lightsteelblue 1px solid; BORDER-LEFT: lightsteelblue 1px solid; COLOR: navy; BORDER-BOTTOM: lightsteelblue 1px solid; FONT-SIZE: 11px; FONT-FAMILY: verdana, arial } .button { BORDER-RIGHT: lightsteelblue 1px solid; BORDER-TOP: lightsteelblue 1px solid; FONT-SIZE: 8pt; BORDER-LEFT: lightsteelblue 1px solid; WIDTH: 70px; COLOR: #000000; COLOR: navy; BORDER-BOTTOM: lightsteelblue 1px solid; FONT-FAMILY: verdana, arial; } TEXTAREA { BORDER-RIGHT: lightsteelblue 1pt solid; BORDER-TOP: lightsteelblue 1pt solid; BORDER-LEFT: lightsteelblue 1pt solid; COLOR: navy; BORDER-BOTTOM: lightsteelblue 1pt solid; FONT-SIZE: 11px; FONT-FAMILY: verdana, arial } Hey guys, I'm new to these forums. I've got experience in CSS but have a few questions that may sound elementary but I can't figure it out and would appreciate any knowledge on this subject. I can't seem to post URL's as a new user so I will have to explain. The problem: I see ID's and classes in a HTML file but they do not exist in the stylesheet. Is anyone familiar with this? Where is the ID getting it's style from? Hi, I'm pretty new to this so not 100% sure what I'm talking about. I'm trying to complete a university project, in order to do so I have to move images using a style sheet and have done so successfully so far but today when trying to move my rollovers the stylesheet didnt move my images. Previous images I moved worked but the new ones dont. Any help would be greatly appreciated! Thanks! |