The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Style Sheet & div formatting
Lensmeister
post Nov 11 2020, 03:00 PM
Post #1


Newbie
*

Group: Members
Posts: 19
Joined: 21-November 12
Member No.: 18,131



Hi all,

I have a external stylesheet (See below) and I want it so that links on the site are blue and underlined.
I want the links in the menu (navigation) to be blue but no underline.

CODE

html,body{margin:0;padding:0}
body{font: 76% arial,sans-serif;text-align:center}
p{margin:0 10px 10px}
a{padding:5px; text-decoration:underline; color:#0000ff;}
div#header{background-color:white;}
div#header h1{margin:0;padding-left:10px;}
div#container{text-align:left}
div#content p{line-height:1.4}
div#navigation{background:#F6F0E0;}
div#navigation ul{margin:15px 0; padding:0; list-style-type:none;}
div#navigation li{margin-bottom:5px;}
div#extra{background:#CCC8B3;}
div#footer{background:white;}
div#footer p{margin:0;padding:5px 10px}
div#container{width:700px;margin: auto}
div#content{float:right;width:500px}
div#navigation{float:left;width:200px}
div#extra{float:right;width:500px}
div#footer{clear:both;width:100%}


This is what I have so far. Currently the links seen in Dreamweaver are in blue but when viewing them on the site (currently using localhost and xampp) they are not showing in blue.

This post has been edited by Lensmeister: Nov 11 2020, 03:02 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 11 2020, 03:58 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



Hi!

QUOTE(Lensmeister @ Nov 11 2020, 09:00 PM) *

I want it so that links on the site are blue and underlined.

That's the default styling, so no CSS is strictly necessary.

QUOTE
I want the links in the menu (navigation) to be blue but no underline.

You could remove it with:

CODE
div#navigation a {text-decoration: none;}


QUOTE

Currently the links seen in Dreamweaver are in blue but when viewing them on the site (currently using localhost and xampp) they are not showing in blue.

Is the CSS file is linked properly by the webpage's HTML? Do you use any other CSS that may interfere?

User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Lensmeister
post Nov 11 2020, 04:20 PM
Post #3


Newbie
*

Group: Members
Posts: 19
Joined: 21-November 12
Member No.: 18,131



The pages are in html (saved as php) and look like

<link rel="stylesheet" type="text/css" href="asset/styles.css" />

It's in the <head> section of the coding
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Nov 11 2020, 05:11 PM
Post #4


.
********

Group: WDG Moderators
Posts: 9,630
Joined: 10-August 06
Member No.: 7



Looks correct. Is the other CSS applied, e.g. the nav background?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Nov 11 2020, 05:49 PM
Post #5


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,716
Joined: 9-August 06
Member No.: 6



If the links aren't blue, what color are they? The text color?

Please post a snip of the HTML containing some of the links.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 28th March 2024 - 03:56 AM