/    Sign up×
Community /Pin to ProfileBookmark

Links in DIV css

Hi all

I am trying to make a sidebar with links that would link to the main body section of the page.

I know how to do this with frames, with the target tag.

In Css, is it a server side issue? I mean, when I preview the page (before publication) in Firefox or IE, and check the links, it opens a new window, instead of where I want it.

I have been checking many other pages and don’t see anything that would tell the link in the sidebar where to load….

Hope this makes sense, and just wondering if it will be a server-side issue and I should stop worrying about it not going where it should, or if I am missing something

Thanks!
Ann

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@KDLAJul 14.2008 — CSS is for presentation; it does not affect the functionality of the HTML. Without seeing your code, it's hard to ascribe a reason to your problem.
Copy linkTweet thisAlerts:
@CentauriJul 14.2008 — A link shouldn't open a new window unless the target tag is set, but the target tag is deprecated and shouln't be used now. The normal link action is to open the new page in the same window - if all your pages have the same navigation sidebar with styles and any images controlled by a common external css file, the css and images will be cached by the browser giving the impression that only the content changes.
Copy linkTweet thisAlerts:
@antigone207authorJul 14.2008 — Thanks for all your help so far...please let me know what I am doing wrong....

Ann

[B]in index.html...[/B]

<div id="sidebar">

<div id="menu">

<ul>

<li class="active"><a href="home.htm" title="home">Homepage</a></li>

<li><a href="assisted living.htm" title="Assisted Living">Assisted Living</a></li>

<li><a href="skilled nursing.htm" title="Skilled Nursing">Skilled Nursing</a></li>

<li><a href="activity.htm" title="Activity">Activity</a></li>

</ul>

</div>


[B]

then in the css file it says:[/B]


#content {

width: 700px;

margin: 0 auto;

background: url(images/img03.gif) repeat-y;

}

#extra {

clear: both;

height: 20px;

background: url(images/img06.gif) no-repeat;

}

/* Content > Main */

#main {

float: right;

width: 460px;

background: url(images/img05.gif) no-repeat right top;

color: #FFA954;

}

#main a {

color: #FF7F00;

}

/* Content > Main > Welcome */

#welcome {

}

/* Content > Main > Example */

#example {

}

/* Content > Sidebar */

#sidebar {

float: left;

width: 220px;

background: url(images/img04.gif) no-repeat;

color: #6BB3B3;

}

#sidebar a {

color: #319595;

}
Copy linkTweet thisAlerts:
@CentauriJul 14.2008 — That snippet looks ok, although index.html should really be the home page as it is what the browser will default to when the domain name is typed, and therefore the link for the home page should be pointing to index.html (unless you are setting up an entry page). If each of the other pages gets the same sidebar html code, and are linked to the same css file, all should be fine.
×

Success!

Help @antigone207 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.28,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...